@douyinfe/semi-ui 2.5.1 → 2.7.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/button/__test__/button.test.js +7 -0
- package/button/buttonGroup.tsx +5 -2
- package/calendar/monthCalendar.tsx +14 -13
- package/cascader/__test__/cascader.test.js +159 -81
- package/cascader/_story/cascader.stories.js +36 -23
- package/cascader/index.tsx +47 -8
- package/cascader/item.tsx +25 -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 +102 -13
- package/datePicker/datePicker.tsx +95 -16
- package/datePicker/index.tsx +15 -0
- package/datePicker/insetInput.tsx +76 -0
- package/datePicker/month.tsx +14 -7
- package/datePicker/monthsGrid.tsx +31 -12
- package/datePicker/navigation.tsx +8 -4
- package/datePicker/quickControl.tsx +1 -0
- package/datePicker/yearAndMonth.tsx +1 -1
- package/dist/css/semi.css +120 -8
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +1100 -193
- 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/hoc/withField.tsx +1 -1
- package/input/_story/input.stories.js +13 -0
- package/lib/cjs/_base/base.css +5 -5
- package/lib/cjs/button/buttonGroup.d.ts +1 -0
- package/lib/cjs/button/buttonGroup.js +6 -2
- package/lib/cjs/calendar/monthCalendar.js +21 -5
- package/lib/cjs/cascader/index.d.ts +10 -2
- package/lib/cjs/cascader/index.js +52 -10
- package/lib/cjs/cascader/item.d.ts +6 -2
- package/lib/cjs/cascader/item.js +33 -4
- package/lib/cjs/datePicker/dateInput.d.ts +9 -4
- package/lib/cjs/datePicker/dateInput.js +107 -13
- package/lib/cjs/datePicker/datePicker.d.ts +7 -2
- package/lib/cjs/datePicker/datePicker.js +138 -30
- 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/month.d.ts +1 -0
- package/lib/cjs/datePicker/month.js +18 -2
- package/lib/cjs/datePicker/monthsGrid.js +35 -11
- 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/hoc/withField.js +1 -1
- 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/scrollList/scrollItem.d.ts +2 -1
- package/lib/cjs/scrollList/scrollItem.js +13 -3
- package/lib/cjs/table/Body/index.d.ts +2 -0
- package/lib/cjs/table/Body/index.js +13 -4
- package/lib/cjs/tree/index.js +5 -3
- package/lib/cjs/tree/interface.d.ts +1 -0
- package/lib/cjs/tree/nodeList.js +2 -1
- package/lib/cjs/treeSelect/index.js +7 -3
- package/lib/es/_base/base.css +5 -5
- package/lib/es/button/buttonGroup.d.ts +1 -0
- package/lib/es/button/buttonGroup.js +5 -2
- package/lib/es/calendar/monthCalendar.js +22 -5
- package/lib/es/cascader/index.d.ts +10 -2
- package/lib/es/cascader/index.js +49 -7
- package/lib/es/cascader/item.d.ts +6 -2
- package/lib/es/cascader/item.js +31 -4
- package/lib/es/datePicker/dateInput.d.ts +9 -4
- package/lib/es/datePicker/dateInput.js +106 -13
- package/lib/es/datePicker/datePicker.d.ts +7 -2
- package/lib/es/datePicker/datePicker.js +139 -30
- 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/month.d.ts +1 -0
- package/lib/es/datePicker/month.js +18 -2
- package/lib/es/datePicker/monthsGrid.js +35 -11
- 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/hoc/withField.js +1 -1
- 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/scrollList/scrollItem.d.ts +2 -1
- package/lib/es/scrollList/scrollItem.js +13 -3
- package/lib/es/table/Body/index.d.ts +2 -0
- package/lib/es/table/Body/index.js +13 -4
- package/lib/es/tree/index.js +5 -3
- package/lib/es/tree/interface.d.ts +1 -0
- package/lib/es/tree/nodeList.js +2 -1
- package/lib/es/treeSelect/index.js +7 -3
- package/navigation/Item.tsx +15 -12
- package/navigation/SubNav.tsx +4 -4
- 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/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/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 +2 -2
- package/treeSelect/__test__/treeSelect.test.js +28 -0
- package/treeSelect/_story/treeSelect.stories.js +55 -2
- package/treeSelect/index.tsx +11 -3
|
@@ -15,6 +15,10 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
15
15
|
}
|
|
16
16
|
return t;
|
|
17
17
|
};
|
|
18
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
19
|
+
|
|
20
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
21
|
+
|
|
18
22
|
/* eslint-disable max-lines-per-function */
|
|
19
23
|
|
|
20
24
|
/* eslint-disable no-unused-vars */
|
|
@@ -27,9 +31,10 @@ import DateInputFoundation from '@douyinfe/semi-foundation/lib/es/datePicker/inp
|
|
|
27
31
|
import { cssClasses, strings } from '@douyinfe/semi-foundation/lib/es/datePicker/constants';
|
|
28
32
|
import { noop } from '@douyinfe/semi-foundation/lib/es/utils/function';
|
|
29
33
|
import isNullOrUndefined from '@douyinfe/semi-foundation/lib/es/utils/isNullOrUndefined';
|
|
34
|
+
import { IconCalendar, IconCalendarClock, IconClear } from '@douyinfe/semi-icons';
|
|
30
35
|
import BaseComponent from '../_base/baseComponent';
|
|
31
36
|
import Input from '../input/index';
|
|
32
|
-
import {
|
|
37
|
+
import { InsetDateInput, InsetTimeInput } from './insetInput'; // eslint-disable-next-line @typescript-eslint/ban-types
|
|
33
38
|
|
|
34
39
|
export default class DateInput extends BaseComponent {
|
|
35
40
|
constructor(props) {
|
|
@@ -67,6 +72,10 @@ export default class DateInput extends BaseComponent {
|
|
|
67
72
|
this.handleRangeInputFocus(e, 'rangeStart');
|
|
68
73
|
};
|
|
69
74
|
|
|
75
|
+
this.handleInsetInputChange = options => {
|
|
76
|
+
this.foundation.handleInsetInputChange(options);
|
|
77
|
+
};
|
|
78
|
+
|
|
70
79
|
this.getRangeInputValue = (rangeStart, rangeEnd) => {
|
|
71
80
|
var _context, _context2;
|
|
72
81
|
|
|
@@ -115,7 +124,8 @@ export default class DateInput extends BaseComponent {
|
|
|
115
124
|
},
|
|
116
125
|
notifyTabPress: function () {
|
|
117
126
|
return _this.props.onRangeEndTabPress(...arguments);
|
|
118
|
-
}
|
|
127
|
+
},
|
|
128
|
+
notifyInsetInputChange: options => this.props.onInsetInputChange(options)
|
|
119
129
|
});
|
|
120
130
|
}
|
|
121
131
|
|
|
@@ -170,9 +180,14 @@ export default class DateInput extends BaseComponent {
|
|
|
170
180
|
} = this.props;
|
|
171
181
|
const allowClear = (rangeStart || rangeEnd) && showClear;
|
|
172
182
|
return allowClear && !disabled ? /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
role: "button",
|
|
184
|
+
tabIndex: 0,
|
|
185
|
+
"aria-label": "Clear range input value",
|
|
173
186
|
className: "".concat(prefixCls, "-range-input-clearbtn"),
|
|
174
187
|
onMouseDown: e => !disabled && this.handleRangeInputClear(e)
|
|
175
|
-
}, /*#__PURE__*/React.createElement(IconClear,
|
|
188
|
+
}, /*#__PURE__*/React.createElement(IconClear, {
|
|
189
|
+
"aria-hidden": true
|
|
190
|
+
})) : null;
|
|
176
191
|
}
|
|
177
192
|
|
|
178
193
|
renderRangeSuffix(suffix) {
|
|
@@ -215,11 +230,11 @@ export default class DateInput extends BaseComponent {
|
|
|
215
230
|
const rangePlaceholder = _Array$isArray(placeholder) ? placeholder : [placeholder, placeholder];
|
|
216
231
|
const [rangeStartPlaceholder, rangeEndPlaceholder] = rangePlaceholder;
|
|
217
232
|
const inputLeftWrapperCls = cls("".concat(prefixCls, "-range-input-wrapper-start"), "".concat(prefixCls, "-range-input-wrapper"), {
|
|
218
|
-
["".concat(prefixCls, "-range-input-wrapper-active")]: rangeInputFocus === 'rangeStart',
|
|
233
|
+
["".concat(prefixCls, "-range-input-wrapper-active")]: rangeInputFocus === 'rangeStart' && !disabled,
|
|
219
234
|
["".concat(prefixCls, "-range-input-wrapper-start-with-prefix")]: this.props.prefix || this.props.insetLabel
|
|
220
235
|
});
|
|
221
236
|
const inputRightWrapperCls = cls("".concat(prefixCls, "-range-input-wrapper-end"), "".concat(prefixCls, "-range-input-wrapper"), {
|
|
222
|
-
["".concat(prefixCls, "-range-input-wrapper-active")]: rangeInputFocus === 'rangeEnd'
|
|
237
|
+
["".concat(prefixCls, "-range-input-wrapper-active")]: rangeInputFocus === 'rangeEnd' && !disabled
|
|
223
238
|
});
|
|
224
239
|
return /*#__PURE__*/React.createElement(React.Fragment, null, this.renderRangePrefix(), /*#__PURE__*/React.createElement("div", {
|
|
225
240
|
onClick: e => !disabled && this.handleRangeInputFocus(e, 'rangeStart'),
|
|
@@ -258,7 +273,70 @@ export default class DateInput extends BaseComponent {
|
|
|
258
273
|
})), this.renderRangeClearBtn(rangeStart, rangeEnd), this.renderRangeSuffix(suffix));
|
|
259
274
|
}
|
|
260
275
|
|
|
261
|
-
|
|
276
|
+
renderInputInset() {
|
|
277
|
+
const {
|
|
278
|
+
type,
|
|
279
|
+
handleInsetDateFocus,
|
|
280
|
+
handleInsetTimeFocus,
|
|
281
|
+
value,
|
|
282
|
+
insetInputValue,
|
|
283
|
+
prefixCls,
|
|
284
|
+
rangeInputStartRef,
|
|
285
|
+
rangeInputEndRef,
|
|
286
|
+
density
|
|
287
|
+
} = this.props;
|
|
288
|
+
|
|
289
|
+
const _isRangeType = _includesInstanceProperty(type).call(type, 'Range');
|
|
290
|
+
|
|
291
|
+
const newInsetInputValue = this.foundation.getInsetInputValue({
|
|
292
|
+
value,
|
|
293
|
+
insetInputValue
|
|
294
|
+
});
|
|
295
|
+
const {
|
|
296
|
+
datePlaceholder,
|
|
297
|
+
timePlaceholder
|
|
298
|
+
} = this.foundation.getInsetInputPlaceholder();
|
|
299
|
+
const insetInputWrapperCls = "".concat(prefixCls, "-inset-input-wrapper");
|
|
300
|
+
const separatorCls = "".concat(prefixCls, "-inset-input-separator");
|
|
301
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
302
|
+
className: insetInputWrapperCls,
|
|
303
|
+
"x-type": type
|
|
304
|
+
}, /*#__PURE__*/React.createElement(InsetDateInput, {
|
|
305
|
+
forwardRef: rangeInputStartRef,
|
|
306
|
+
insetInputValue: newInsetInputValue,
|
|
307
|
+
placeholder: datePlaceholder,
|
|
308
|
+
valuePath: 'monthLeft.dateInput',
|
|
309
|
+
onChange: this.handleInsetInputChange,
|
|
310
|
+
onFocus: e => handleInsetDateFocus(e, 'rangeStart')
|
|
311
|
+
}), /*#__PURE__*/React.createElement(InsetTimeInput, {
|
|
312
|
+
disabled: !newInsetInputValue.monthLeft.dateInput,
|
|
313
|
+
insetInputValue: newInsetInputValue,
|
|
314
|
+
placeholder: timePlaceholder,
|
|
315
|
+
type: type,
|
|
316
|
+
valuePath: 'monthLeft.timeInput',
|
|
317
|
+
onChange: this.handleInsetInputChange,
|
|
318
|
+
onFocus: handleInsetTimeFocus
|
|
319
|
+
}), _isRangeType && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
320
|
+
className: separatorCls
|
|
321
|
+
}, density === 'compact' ? null : '-'), /*#__PURE__*/React.createElement(InsetDateInput, {
|
|
322
|
+
forwardRef: rangeInputEndRef,
|
|
323
|
+
insetInputValue: newInsetInputValue,
|
|
324
|
+
placeholder: datePlaceholder,
|
|
325
|
+
valuePath: 'monthRight.dateInput',
|
|
326
|
+
onChange: this.handleInsetInputChange,
|
|
327
|
+
onFocus: e => handleInsetDateFocus(e, 'rangeEnd')
|
|
328
|
+
}), /*#__PURE__*/React.createElement(InsetTimeInput, {
|
|
329
|
+
disabled: !newInsetInputValue.monthRight.dateInput,
|
|
330
|
+
insetInputValue: newInsetInputValue,
|
|
331
|
+
placeholder: timePlaceholder,
|
|
332
|
+
type: type,
|
|
333
|
+
valuePath: 'monthRight.timeInput',
|
|
334
|
+
onChange: this.handleInsetInputChange,
|
|
335
|
+
onFocus: handleInsetTimeFocus
|
|
336
|
+
})));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
renderTriggerInput() {
|
|
262
340
|
const _a = this.props,
|
|
263
341
|
{
|
|
264
342
|
placeholder,
|
|
@@ -273,6 +351,8 @@ export default class DateInput extends BaseComponent {
|
|
|
273
351
|
validateStatus,
|
|
274
352
|
block,
|
|
275
353
|
prefixCls,
|
|
354
|
+
multiple,
|
|
355
|
+
// Whether to allow multiple values for email and file types
|
|
276
356
|
dateFnsLocale,
|
|
277
357
|
// No need to pass to input
|
|
278
358
|
onBlur,
|
|
@@ -288,12 +368,18 @@ export default class DateInput extends BaseComponent {
|
|
|
288
368
|
onRangeBlur,
|
|
289
369
|
onRangeEndTabPress,
|
|
290
370
|
rangeInputFocus,
|
|
291
|
-
rangeSeparator
|
|
371
|
+
rangeSeparator,
|
|
372
|
+
insetInput,
|
|
373
|
+
insetInputValue
|
|
292
374
|
} = _a,
|
|
293
|
-
rest = __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"]);
|
|
375
|
+
rest = __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", "insetInput", "insetInputValue"]);
|
|
294
376
|
|
|
295
|
-
const dateIcon = /*#__PURE__*/React.createElement(IconCalendar,
|
|
296
|
-
|
|
377
|
+
const dateIcon = /*#__PURE__*/React.createElement(IconCalendar, {
|
|
378
|
+
"aria-hidden": true
|
|
379
|
+
});
|
|
380
|
+
const dateTimeIcon = /*#__PURE__*/React.createElement(IconCalendarClock, {
|
|
381
|
+
"aria-hidden": true
|
|
382
|
+
});
|
|
297
383
|
const suffix = _includesInstanceProperty(type).call(type, 'Time') ? dateTimeIcon : dateIcon;
|
|
298
384
|
let text = '';
|
|
299
385
|
|
|
@@ -337,6 +423,13 @@ export default class DateInput extends BaseComponent {
|
|
|
337
423
|
}));
|
|
338
424
|
}
|
|
339
425
|
|
|
426
|
+
render() {
|
|
427
|
+
const {
|
|
428
|
+
insetInput
|
|
429
|
+
} = this.props;
|
|
430
|
+
return insetInput ? this.renderInputInset() : this.renderTriggerInput();
|
|
431
|
+
}
|
|
432
|
+
|
|
340
433
|
}
|
|
341
434
|
DateInput.propTypes = {
|
|
342
435
|
onClick: PropTypes.func,
|
|
@@ -348,7 +441,6 @@ DateInput.propTypes = {
|
|
|
348
441
|
value: PropTypes.array,
|
|
349
442
|
disabled: PropTypes.bool,
|
|
350
443
|
type: PropTypes.oneOf(strings.TYPE_SET),
|
|
351
|
-
multiple: PropTypes.bool,
|
|
352
444
|
showClear: PropTypes.bool,
|
|
353
445
|
format: PropTypes.string,
|
|
354
446
|
inputStyle: PropTypes.object,
|
|
@@ -362,7 +454,9 @@ DateInput.propTypes = {
|
|
|
362
454
|
rangeInputFocus: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
363
455
|
rangeInputStartRef: PropTypes.object,
|
|
364
456
|
rangeInputEndRef: PropTypes.object,
|
|
365
|
-
rangeSeparator: PropTypes.string
|
|
457
|
+
rangeSeparator: PropTypes.string,
|
|
458
|
+
insetInput: PropTypes.bool,
|
|
459
|
+
insetInputValue: PropTypes.object
|
|
366
460
|
};
|
|
367
461
|
DateInput.defaultProps = {
|
|
368
462
|
showClear: true,
|
|
@@ -372,7 +466,6 @@ DateInput.defaultProps = {
|
|
|
372
466
|
onBlur: noop,
|
|
373
467
|
onClear: noop,
|
|
374
468
|
onFocus: noop,
|
|
375
|
-
multiple: false,
|
|
376
469
|
type: 'date',
|
|
377
470
|
inputStyle: {},
|
|
378
471
|
inputReadOnly: false,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import DatePickerFoundation, { DatePickerAdapter, DatePickerFoundationProps, DatePickerFoundationState, DayStatusType, PresetType, Type } from '@douyinfe/semi-foundation/lib/es/datePicker/foundation';
|
|
3
|
+
import DatePickerFoundation, { DatePickerAdapter, DatePickerFoundationProps, DatePickerFoundationState, DayStatusType, PresetType, Type, RangeType } from '@douyinfe/semi-foundation/lib/es/datePicker/foundation';
|
|
4
4
|
import BaseComponent from '../_base/baseComponent';
|
|
5
5
|
import { DateInputProps } from './dateInput';
|
|
6
6
|
import MonthsGrid, { MonthsGridProps } from './monthsGrid';
|
|
7
7
|
import { YearAndMonthProps } from './yearAndMonth';
|
|
8
8
|
import '@douyinfe/semi-foundation/lib/es/datePicker/datePicker.css';
|
|
9
9
|
import { Locale } from '../locale/interface';
|
|
10
|
-
import { RangeType } from '@douyinfe/semi-foundation/lib/es/datePicker/inputFoundation';
|
|
11
10
|
import { TimePickerProps } from '../timePicker/TimePicker';
|
|
11
|
+
import { InsetInputChangeProps } from '@douyinfe/semi-foundation/lib/es/datePicker/inputFoundation';
|
|
12
12
|
export interface DatePickerProps extends DatePickerFoundationProps {
|
|
13
13
|
'aria-describedby'?: React.AriaAttributes['aria-describedby'];
|
|
14
14
|
'aria-errormessage'?: React.AriaAttributes['aria-errormessage'];
|
|
@@ -143,6 +143,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
143
143
|
autoSwitchDate: boolean;
|
|
144
144
|
syncSwitchMonth: boolean;
|
|
145
145
|
rangeSeparator: " ~ ";
|
|
146
|
+
insetInput: boolean;
|
|
146
147
|
};
|
|
147
148
|
triggerElRef: React.MutableRefObject<HTMLElement>;
|
|
148
149
|
panelRef: React.RefObject<HTMLDivElement>;
|
|
@@ -171,6 +172,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
171
172
|
renderQuickControls(): JSX.Element;
|
|
172
173
|
handleOpenPanel: () => void;
|
|
173
174
|
handleInputChange: DatePickerFoundation['handleInputChange'];
|
|
175
|
+
handleInsetInputChange: (options: InsetInputChangeProps) => void;
|
|
174
176
|
handleInputComplete: DatePickerFoundation['handleInputComplete'];
|
|
175
177
|
handleInputBlur: DateInputProps['onBlur'];
|
|
176
178
|
handleInputFocus: DatePickerFoundation['handleInputFocus'];
|
|
@@ -181,6 +183,9 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
181
183
|
handleRangeInputClear: DatePickerFoundation['handleRangeInputClear'];
|
|
182
184
|
handleRangeEndTabPress: DatePickerFoundation['handleRangeEndTabPress'];
|
|
183
185
|
isAnotherPanelHasOpened: (currentRangeInput: RangeType) => boolean;
|
|
186
|
+
handleInsetDateFocus: (e: React.FocusEvent, rangeType: 'rangeStart' | 'rangeEnd') => void;
|
|
187
|
+
handleInsetTimeFocus: () => void;
|
|
188
|
+
handlePanelVisibleChange: (visible: boolean) => void;
|
|
184
189
|
renderInner(extraProps?: Partial<DatePickerProps>): JSX.Element;
|
|
185
190
|
handleConfirm: (e: React.MouseEvent) => void;
|
|
186
191
|
handleCancel: (e: React.MouseEvent) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _isEqual from "lodash/isEqual";
|
|
1
2
|
import _isFunction from "lodash/isFunction";
|
|
2
3
|
import _get from "lodash/get";
|
|
3
4
|
import _isDate from "lodash/isDate";
|
|
@@ -9,7 +10,13 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/ins
|
|
|
9
10
|
import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
|
10
11
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
12
|
|
|
13
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/interactive-supports-focus */
|
|
14
|
+
|
|
12
15
|
/* eslint-disable max-len */
|
|
16
|
+
|
|
17
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
18
|
+
|
|
19
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
13
20
|
import React from 'react';
|
|
14
21
|
import classnames from 'classnames';
|
|
15
22
|
import PropTypes from 'prop-types';
|
|
@@ -63,6 +70,8 @@ export default class DatePicker extends BaseComponent {
|
|
|
63
70
|
return _this.foundation.handleInputChange(...arguments);
|
|
64
71
|
};
|
|
65
72
|
|
|
73
|
+
this.handleInsetInputChange = options => this.foundation.handleInsetInputChange(options);
|
|
74
|
+
|
|
66
75
|
this.handleInputComplete = v => this.foundation.handleInputComplete(v);
|
|
67
76
|
|
|
68
77
|
this.handleInputBlur = e => this.foundation.handleInputBlur(_get(e, 'nativeEvent.target.value'), e);
|
|
@@ -91,6 +100,30 @@ export default class DatePicker extends BaseComponent {
|
|
|
91
100
|
}
|
|
92
101
|
};
|
|
93
102
|
|
|
103
|
+
this.handleInsetDateFocus = (e, rangeType) => {
|
|
104
|
+
const monthGridFoundation = _get(this, 'monthGrid.current.foundation');
|
|
105
|
+
|
|
106
|
+
if (monthGridFoundation) {
|
|
107
|
+
monthGridFoundation.showDatePanel(strings.PANEL_TYPE_LEFT);
|
|
108
|
+
monthGridFoundation.showDatePanel(strings.PANEL_TYPE_RIGHT);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
this.handleInputFocus(e, rangeType);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
this.handleInsetTimeFocus = () => {
|
|
115
|
+
const monthGridFoundation = _get(this, 'monthGrid.current.foundation');
|
|
116
|
+
|
|
117
|
+
if (monthGridFoundation) {
|
|
118
|
+
monthGridFoundation.showTimePicker(strings.PANEL_TYPE_LEFT);
|
|
119
|
+
monthGridFoundation.showTimePicker(strings.PANEL_TYPE_RIGHT);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
this.handlePanelVisibleChange = visible => {
|
|
124
|
+
this.foundation.handlePanelVisibleChange(visible);
|
|
125
|
+
};
|
|
126
|
+
|
|
94
127
|
this.handleConfirm = e => this.foundation.handleConfirm();
|
|
95
128
|
|
|
96
129
|
this.handleCancel = e => this.foundation.handleCancel();
|
|
@@ -114,19 +147,43 @@ export default class DatePicker extends BaseComponent {
|
|
|
114
147
|
dropdownStyle,
|
|
115
148
|
density,
|
|
116
149
|
topSlot,
|
|
117
|
-
bottomSlot
|
|
150
|
+
bottomSlot,
|
|
151
|
+
insetInput,
|
|
152
|
+
type,
|
|
153
|
+
format,
|
|
154
|
+
rangeSeparator
|
|
118
155
|
} = this.props;
|
|
156
|
+
const {
|
|
157
|
+
insetInputValue,
|
|
158
|
+
value
|
|
159
|
+
} = this.state;
|
|
119
160
|
const wrapCls = classnames(cssClasses.PREFIX, {
|
|
120
161
|
[cssClasses.PANEL_YAM]: this.adapter.typeIsYearOrMonth(),
|
|
121
162
|
["".concat(cssClasses.PREFIX, "-compact")]: density === 'compact'
|
|
122
163
|
}, dropdownClassName);
|
|
164
|
+
const insetInputProps = {
|
|
165
|
+
dateFnsLocale,
|
|
166
|
+
format,
|
|
167
|
+
insetInputValue,
|
|
168
|
+
rangeSeparator,
|
|
169
|
+
type,
|
|
170
|
+
value: value,
|
|
171
|
+
handleInsetDateFocus: this.handleInsetDateFocus,
|
|
172
|
+
handleInsetTimeFocus: this.handleInsetTimeFocus,
|
|
173
|
+
onInsetInputChange: this.handleInsetInputChange,
|
|
174
|
+
rangeInputStartRef: this.rangeInputStartRef,
|
|
175
|
+
rangeInputEndRef: this.rangeInputEndRef,
|
|
176
|
+
density
|
|
177
|
+
};
|
|
123
178
|
return /*#__PURE__*/React.createElement("div", {
|
|
124
179
|
ref: this.panelRef,
|
|
125
180
|
className: wrapCls,
|
|
126
181
|
style: dropdownStyle
|
|
127
182
|
}, topSlot && /*#__PURE__*/React.createElement("div", {
|
|
128
183
|
className: "".concat(cssClasses.PREFIX, "-topSlot")
|
|
129
|
-
}, topSlot),
|
|
184
|
+
}, topSlot), insetInput && /*#__PURE__*/React.createElement(DateInput, _Object$assign({}, insetInputProps, {
|
|
185
|
+
insetInput: true
|
|
186
|
+
})), this.adapter.typeIsYearOrMonth() ? this.renderYearMonthPanel(locale, localeCode) : this.renderMonthGrid(locale, localeCode, dateFnsLocale), this.renderQuickControls(), bottomSlot && /*#__PURE__*/React.createElement("div", {
|
|
130
187
|
className: "".concat(cssClasses.PREFIX, "-bottomSlot")
|
|
131
188
|
}, bottomSlot), this.renderFooter(locale, localeCode));
|
|
132
189
|
};
|
|
@@ -190,7 +247,8 @@ export default class DatePicker extends BaseComponent {
|
|
|
190
247
|
position: position,
|
|
191
248
|
visible: panelShow,
|
|
192
249
|
stopPropagation: stopPropagation,
|
|
193
|
-
spacing: spacing
|
|
250
|
+
spacing: spacing,
|
|
251
|
+
onVisibleChange: this.handlePanelVisibleChange
|
|
194
252
|
}, children);
|
|
195
253
|
};
|
|
196
254
|
|
|
@@ -203,7 +261,9 @@ export default class DatePicker extends BaseComponent {
|
|
|
203
261
|
prevTimeZone: null,
|
|
204
262
|
motionEnd: false,
|
|
205
263
|
rangeInputFocus: undefined,
|
|
206
|
-
autofocus: props.autoFocus || this.isRangeType(props.type, props.triggerRender) && (props.open || props.defaultOpen)
|
|
264
|
+
autofocus: props.autoFocus || this.isRangeType(props.type, props.triggerRender) && (props.open || props.defaultOpen),
|
|
265
|
+
insetInputValue: null,
|
|
266
|
+
triggerDisabled: undefined
|
|
207
267
|
};
|
|
208
268
|
this.adapter.setCache('cachedSelectedValue', null);
|
|
209
269
|
this.triggerElRef = /*#__PURE__*/React.createRef();
|
|
@@ -306,6 +366,17 @@ export default class DatePicker extends BaseComponent {
|
|
|
306
366
|
inputValue
|
|
307
367
|
});
|
|
308
368
|
},
|
|
369
|
+
updateInsetInputValue: insetInputValue => {
|
|
370
|
+
const {
|
|
371
|
+
insetInput
|
|
372
|
+
} = this.props;
|
|
373
|
+
|
|
374
|
+
if (insetInput && !_isEqual(insetInputValue, this.state.insetInputValue)) {
|
|
375
|
+
this.setState({
|
|
376
|
+
insetInputValue
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
},
|
|
309
380
|
needConfirm: () => {
|
|
310
381
|
var _context;
|
|
311
382
|
|
|
@@ -380,7 +451,38 @@ export default class DatePicker extends BaseComponent {
|
|
|
380
451
|
}
|
|
381
452
|
},
|
|
382
453
|
couldPanelClosed: () => this.focusRecordsRef.current.rangeStart && this.focusRecordsRef.current.rangeEnd,
|
|
383
|
-
isEventTarget: e => e && e.target === e.currentTarget
|
|
454
|
+
isEventTarget: e => e && e.target === e.currentTarget,
|
|
455
|
+
setInsetInputFocus: () => {
|
|
456
|
+
const {
|
|
457
|
+
rangeInputFocus
|
|
458
|
+
} = this.state;
|
|
459
|
+
|
|
460
|
+
switch (rangeInputFocus) {
|
|
461
|
+
case 'rangeEnd':
|
|
462
|
+
if (document.activeElement !== this.rangeInputEndRef.current) {
|
|
463
|
+
const inputEndNode = _get(this, 'rangeInputEndRef.current');
|
|
464
|
+
|
|
465
|
+
inputEndNode && inputEndNode.focus();
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
break;
|
|
469
|
+
|
|
470
|
+
case 'rangeStart':
|
|
471
|
+
default:
|
|
472
|
+
if (document.activeElement !== this.rangeInputStartRef.current) {
|
|
473
|
+
const inputStartNode = _get(this, 'rangeInputStartRef.current');
|
|
474
|
+
|
|
475
|
+
inputStartNode && inputStartNode.focus();
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
setTriggerDisabled: disabled => {
|
|
482
|
+
this.setState({
|
|
483
|
+
triggerDisabled: disabled
|
|
484
|
+
});
|
|
485
|
+
}
|
|
384
486
|
});
|
|
385
487
|
}
|
|
386
488
|
|
|
@@ -438,7 +540,8 @@ export default class DatePicker extends BaseComponent {
|
|
|
438
540
|
syncSwitchMonth,
|
|
439
541
|
onPanelChange,
|
|
440
542
|
timeZone,
|
|
441
|
-
triggerRender
|
|
543
|
+
triggerRender,
|
|
544
|
+
insetInput
|
|
442
545
|
} = this.props;
|
|
443
546
|
const {
|
|
444
547
|
value,
|
|
@@ -486,7 +589,8 @@ export default class DatePicker extends BaseComponent {
|
|
|
486
589
|
onPanelChange: onPanelChange,
|
|
487
590
|
timeZone: timeZone,
|
|
488
591
|
focusRecordsRef: this.focusRecordsRef,
|
|
489
|
-
triggerRender: triggerRender
|
|
592
|
+
triggerRender: triggerRender,
|
|
593
|
+
insetInput: insetInput
|
|
490
594
|
});
|
|
491
595
|
}
|
|
492
596
|
|
|
@@ -522,20 +626,23 @@ export default class DatePicker extends BaseComponent {
|
|
|
522
626
|
triggerRender,
|
|
523
627
|
size,
|
|
524
628
|
inputReadOnly,
|
|
525
|
-
rangeSeparator
|
|
629
|
+
rangeSeparator,
|
|
630
|
+
insetInput
|
|
526
631
|
} = this.props;
|
|
527
632
|
const {
|
|
528
633
|
value,
|
|
529
634
|
inputValue,
|
|
530
|
-
rangeInputFocus
|
|
635
|
+
rangeInputFocus,
|
|
636
|
+
triggerDisabled
|
|
531
637
|
} = this.state; // This class is not needed when triggerRender is function
|
|
532
638
|
|
|
533
639
|
const isRangeType = this.isRangeType(type, triggerRender);
|
|
640
|
+
const inputDisabled = disabled || insetInput && triggerDisabled;
|
|
534
641
|
const inputCls = classnames("".concat(cssClasses.PREFIX, "-input"), {
|
|
535
642
|
["".concat(cssClasses.PREFIX, "-range-input")]: isRangeType,
|
|
536
643
|
[_concatInstanceProperty(_context3 = "".concat(cssClasses.PREFIX, "-range-input-")).call(_context3, size)]: isRangeType && size,
|
|
537
|
-
["".concat(cssClasses.PREFIX, "-range-input-active")]: isRangeType && rangeInputFocus && !
|
|
538
|
-
["".concat(cssClasses.PREFIX, "-range-input-disabled")]: isRangeType &&
|
|
644
|
+
["".concat(cssClasses.PREFIX, "-range-input-active")]: isRangeType && rangeInputFocus && !inputDisabled,
|
|
645
|
+
["".concat(cssClasses.PREFIX, "-range-input-disabled")]: isRangeType && inputDisabled,
|
|
539
646
|
[_concatInstanceProperty(_context4 = "".concat(cssClasses.PREFIX, "-range-input-")).call(_context4, validateStatus)]: isRangeType && validateStatus
|
|
540
647
|
});
|
|
541
648
|
const phText = placeholder || locale.placeholder[type]; // i18n
|
|
@@ -543,9 +650,9 @@ export default class DatePicker extends BaseComponent {
|
|
|
543
650
|
|
|
544
651
|
const props = _Object$assign(_Object$assign({}, extraProps), {
|
|
545
652
|
placeholder: phText,
|
|
546
|
-
disabled,
|
|
653
|
+
disabled: inputDisabled,
|
|
547
654
|
inputValue,
|
|
548
|
-
value,
|
|
655
|
+
value: value,
|
|
549
656
|
onChange: this.handleInputChange,
|
|
550
657
|
onEnterPress: this.handleInputComplete,
|
|
551
658
|
// TODO: remove in next major version
|
|
@@ -558,7 +665,7 @@ export default class DatePicker extends BaseComponent {
|
|
|
558
665
|
format,
|
|
559
666
|
multiple,
|
|
560
667
|
validateStatus,
|
|
561
|
-
inputReadOnly,
|
|
668
|
+
inputReadOnly: inputReadOnly || insetInput,
|
|
562
669
|
// onClick: this.handleOpenPanel,
|
|
563
670
|
onBlur: this.handleInputBlur,
|
|
564
671
|
onFocus: this.handleInputFocus,
|
|
@@ -567,27 +674,28 @@ export default class DatePicker extends BaseComponent {
|
|
|
567
674
|
size,
|
|
568
675
|
autofocus: this.state.autofocus,
|
|
569
676
|
dateFnsLocale,
|
|
570
|
-
rangeInputStartRef: this.rangeInputStartRef,
|
|
571
|
-
rangeInputEndRef: this.rangeInputEndRef,
|
|
572
677
|
rangeInputFocus,
|
|
573
678
|
rangeSeparator,
|
|
574
679
|
onRangeBlur: this.handleRangeInputBlur,
|
|
575
680
|
onRangeClear: this.handleRangeInputClear,
|
|
576
|
-
onRangeEndTabPress: this.handleRangeEndTabPress
|
|
681
|
+
onRangeEndTabPress: this.handleRangeEndTabPress,
|
|
682
|
+
rangeInputStartRef: insetInput ? null : this.rangeInputStartRef,
|
|
683
|
+
rangeInputEndRef: insetInput ? null : this.rangeInputEndRef
|
|
577
684
|
});
|
|
578
685
|
|
|
579
|
-
return (
|
|
580
|
-
|
|
581
|
-
// eslint-disable-next-line jsx-a11y/
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
686
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
687
|
+
// tooltip will mount a11y props to children
|
|
688
|
+
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
689
|
+
role: "combobox",
|
|
690
|
+
"aria-label": _Array$isArray(value) && value.length ? "Change date" : "Choose date",
|
|
691
|
+
"aria-disabled": disabled,
|
|
692
|
+
onClick: this.handleTriggerWrapperClick,
|
|
693
|
+
className: inputCls
|
|
694
|
+
}, typeof triggerRender === 'function' ? /*#__PURE__*/React.createElement(Trigger, _Object$assign({}, props, {
|
|
695
|
+
triggerRender: triggerRender,
|
|
696
|
+
componentName: "DatePicker",
|
|
697
|
+
componentProps: _Object$assign({}, this.props)
|
|
698
|
+
})) : /*#__PURE__*/React.createElement(DateInput, _Object$assign({}, props)));
|
|
591
699
|
}
|
|
592
700
|
|
|
593
701
|
render() {
|
|
@@ -720,5 +828,6 @@ DatePicker.defaultProps = {
|
|
|
720
828
|
spacing: numbers.SPACING,
|
|
721
829
|
autoSwitchDate: true,
|
|
722
830
|
syncSwitchMonth: false,
|
|
723
|
-
rangeSeparator: strings.DEFAULT_SEPARATOR_RANGE
|
|
831
|
+
rangeSeparator: strings.DEFAULT_SEPARATOR_RANGE,
|
|
832
|
+
insetInput: false
|
|
724
833
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
2
2
|
import _trimInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/trim";
|
|
3
|
+
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import { forwardStatics } from '@douyinfe/semi-foundation/lib/es/utils/object';
|
|
6
|
+
import { numbers, strings } from '@douyinfe/semi-foundation/lib/es/datePicker/constants';
|
|
5
7
|
import DatePicker from './datePicker';
|
|
6
8
|
import ConfigContext from '../configProvider/context';
|
|
7
9
|
import LocaleConsumer from '../locale/localeConsumer';
|
|
@@ -29,6 +31,24 @@ export default forwardStatics( /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
29
31
|
propsObj.rangeSeparator = " ".concat(_trimInstanceProperty(rangeSeparator).call(rangeSeparator), " ");
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
if (propsObj.insetInput) {
|
|
35
|
+
var _context;
|
|
36
|
+
|
|
37
|
+
if (!propsObj.position) {
|
|
38
|
+
propsObj.position = strings.POSITION_INLINE_INPUT;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* When insetInput is `true` and `position` includes `over`, use 1px `spacing` to solve the problem of border-radius leakage in the upper left corner
|
|
42
|
+
*
|
|
43
|
+
* @see https://user-images.githubusercontent.com/26477537/158817185-126a5f33-41f7-414a-8e36-8d1be2dda5cd.png
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
if (_includesInstanceProperty(_context = propsObj.position).call(_context, 'Over') && !propsObj.spacing) {
|
|
48
|
+
propsObj.spacing = numbers.SPACING_INSET_INPUT;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
32
52
|
return /*#__PURE__*/React.createElement(ConfigContext.Consumer, null, _ref => {
|
|
33
53
|
let {
|
|
34
54
|
timeZone
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InsetInputValue, Type, InsetInputChangeFoundationProps } from '@douyinfe/semi-foundation/lib/es/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,65 @@
|
|
|
1
|
+
import _get from "lodash/get";
|
|
2
|
+
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Input from '../input';
|
|
5
|
+
export function InsetDateInput(props) {
|
|
6
|
+
const {
|
|
7
|
+
insetInputValue,
|
|
8
|
+
valuePath,
|
|
9
|
+
onFocus,
|
|
10
|
+
onChange,
|
|
11
|
+
placeholder,
|
|
12
|
+
forwardRef
|
|
13
|
+
} = props;
|
|
14
|
+
|
|
15
|
+
const value = _get(insetInputValue, valuePath);
|
|
16
|
+
|
|
17
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
18
|
+
value: value,
|
|
19
|
+
onChange: (value, event) => {
|
|
20
|
+
onChange({
|
|
21
|
+
value,
|
|
22
|
+
event,
|
|
23
|
+
insetInputValue,
|
|
24
|
+
valuePath
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
onFocus: onFocus,
|
|
28
|
+
placeholder: placeholder,
|
|
29
|
+
ref: forwardRef
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export function InsetTimeInput(props) {
|
|
33
|
+
const {
|
|
34
|
+
insetInputValue,
|
|
35
|
+
valuePath,
|
|
36
|
+
type,
|
|
37
|
+
onFocus,
|
|
38
|
+
onChange,
|
|
39
|
+
placeholder,
|
|
40
|
+
disabled
|
|
41
|
+
} = props;
|
|
42
|
+
|
|
43
|
+
const _isTimeType = _includesInstanceProperty(type).call(type, 'Time');
|
|
44
|
+
|
|
45
|
+
if (!_isTimeType) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const value = _get(insetInputValue, valuePath);
|
|
50
|
+
|
|
51
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
52
|
+
value: value,
|
|
53
|
+
onChange: (value, event) => {
|
|
54
|
+
onChange({
|
|
55
|
+
value,
|
|
56
|
+
event,
|
|
57
|
+
insetInputValue,
|
|
58
|
+
valuePath
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
onFocus: onFocus,
|
|
62
|
+
placeholder: placeholder,
|
|
63
|
+
disabled: disabled
|
|
64
|
+
});
|
|
65
|
+
}
|