@douyinfe/semi-ui 2.31.2-alpha.0 → 2.32.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/semi.css +40 -11
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +693 -379
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/buttonGroup.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/cascader/index.d.ts +1 -0
- package/lib/cjs/cascader/index.js +10 -1
- package/lib/cjs/datePicker/dateInput.d.ts +5 -1
- package/lib/cjs/datePicker/dateInput.js +16 -9
- package/lib/cjs/datePicker/datePicker.d.ts +33 -5
- package/lib/cjs/datePicker/datePicker.js +104 -23
- package/lib/cjs/datePicker/index.d.ts +1 -0
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGrid.js +11 -3
- package/lib/cjs/datePicker/yearAndMonth.d.ts +10 -6
- package/lib/cjs/datePicker/yearAndMonth.js +84 -30
- package/lib/cjs/form/baseForm.d.ts +3 -3
- package/lib/cjs/form/field.d.ts +2 -2
- package/lib/cjs/input/index.d.ts +1 -1
- package/lib/cjs/input/inputGroup.d.ts +1 -1
- package/lib/cjs/locale/interface.d.ts +1 -0
- package/lib/cjs/locale/source/ar.js +2 -1
- package/lib/cjs/locale/source/de.js +2 -1
- package/lib/cjs/locale/source/en_GB.js +2 -1
- package/lib/cjs/locale/source/en_US.js +2 -1
- package/lib/cjs/locale/source/es.js +2 -1
- package/lib/cjs/locale/source/fr.js +2 -1
- package/lib/cjs/locale/source/id_ID.js +2 -1
- package/lib/cjs/locale/source/it.js +2 -1
- package/lib/cjs/locale/source/ja_JP.js +2 -1
- package/lib/cjs/locale/source/ko_KR.js +2 -1
- package/lib/cjs/locale/source/ms_MY.js +2 -1
- package/lib/cjs/locale/source/nl_NL.js +2 -1
- package/lib/cjs/locale/source/pl_PL.js +2 -1
- package/lib/cjs/locale/source/pt_BR.js +2 -1
- package/lib/cjs/locale/source/ro.d.ts +1 -0
- package/lib/cjs/locale/source/ro.js +2 -1
- package/lib/cjs/locale/source/ru_RU.js +2 -1
- package/lib/cjs/locale/source/sv_SE.js +2 -1
- package/lib/cjs/locale/source/th_TH.js +2 -1
- package/lib/cjs/locale/source/tr_TR.js +2 -1
- package/lib/cjs/locale/source/vi_VN.js +2 -1
- package/lib/cjs/locale/source/zh_CN.js +2 -1
- package/lib/cjs/locale/source/zh_TW.js +2 -1
- package/lib/cjs/modal/confirm.d.ts +8 -8
- package/lib/cjs/navigation/Item.js +4 -2
- package/lib/cjs/navigation/nav-context.d.ts +2 -0
- package/lib/cjs/rating/index.d.ts +1 -1
- package/lib/cjs/rating/item.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +18 -1
- package/lib/cjs/select/index.js +4 -1
- package/lib/cjs/sideSheet/SideSheetContent.d.ts +3 -1
- package/lib/cjs/sideSheet/SideSheetContent.js +3 -2
- package/lib/cjs/sideSheet/index.js +6 -3
- package/lib/cjs/space/index.js +5 -2
- package/lib/cjs/switch/index.d.ts +1 -1
- package/lib/cjs/switch/index.js +1 -1
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/table/index.d.ts +1 -1
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +1 -1
- package/lib/cjs/treeSelect/index.d.ts +1 -0
- package/lib/cjs/treeSelect/index.js +7 -3
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/buttonGroup.d.ts +1 -1
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/cascader/index.d.ts +1 -0
- package/lib/es/cascader/index.js +10 -1
- package/lib/es/datePicker/dateInput.d.ts +5 -1
- package/lib/es/datePicker/dateInput.js +16 -9
- package/lib/es/datePicker/datePicker.d.ts +33 -5
- package/lib/es/datePicker/datePicker.js +109 -23
- package/lib/es/datePicker/index.d.ts +1 -0
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.js +11 -3
- package/lib/es/datePicker/yearAndMonth.d.ts +10 -6
- package/lib/es/datePicker/yearAndMonth.js +83 -29
- package/lib/es/form/baseForm.d.ts +3 -3
- package/lib/es/form/field.d.ts +2 -2
- package/lib/es/input/index.d.ts +1 -1
- package/lib/es/input/inputGroup.d.ts +1 -1
- package/lib/es/locale/interface.d.ts +1 -0
- package/lib/es/locale/source/ar.js +2 -1
- package/lib/es/locale/source/de.js +2 -1
- package/lib/es/locale/source/en_GB.js +2 -1
- package/lib/es/locale/source/en_US.js +2 -1
- package/lib/es/locale/source/es.js +2 -1
- package/lib/es/locale/source/fr.js +2 -1
- package/lib/es/locale/source/id_ID.js +2 -1
- package/lib/es/locale/source/it.js +2 -1
- package/lib/es/locale/source/ja_JP.js +2 -1
- package/lib/es/locale/source/ko_KR.js +2 -1
- package/lib/es/locale/source/ms_MY.js +2 -1
- package/lib/es/locale/source/nl_NL.js +2 -1
- package/lib/es/locale/source/pl_PL.js +2 -1
- package/lib/es/locale/source/pt_BR.js +2 -1
- package/lib/es/locale/source/ro.d.ts +1 -0
- package/lib/es/locale/source/ro.js +2 -1
- package/lib/es/locale/source/ru_RU.js +2 -1
- package/lib/es/locale/source/sv_SE.js +2 -1
- package/lib/es/locale/source/th_TH.js +2 -1
- package/lib/es/locale/source/tr_TR.js +2 -1
- package/lib/es/locale/source/vi_VN.js +2 -1
- package/lib/es/locale/source/zh_CN.js +2 -1
- package/lib/es/locale/source/zh_TW.js +2 -1
- package/lib/es/modal/confirm.d.ts +8 -8
- package/lib/es/navigation/Item.js +4 -2
- package/lib/es/navigation/nav-context.d.ts +2 -0
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/rating/item.d.ts +1 -1
- package/lib/es/select/index.d.ts +18 -1
- package/lib/es/select/index.js +4 -1
- package/lib/es/sideSheet/SideSheetContent.d.ts +3 -1
- package/lib/es/sideSheet/SideSheetContent.js +3 -2
- package/lib/es/sideSheet/index.js +6 -3
- package/lib/es/space/index.js +4 -2
- package/lib/es/switch/index.d.ts +1 -1
- package/lib/es/switch/index.js +1 -1
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/tagInput/index.d.ts +1 -1
- package/lib/es/timePicker/TimePicker.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +1 -1
- package/lib/es/treeSelect/index.d.ts +1 -0
- package/lib/es/treeSelect/index.js +7 -3
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
9
|
+
|
|
8
10
|
var _stubFalse2 = _interopRequireDefault(require("lodash/stubFalse"));
|
|
9
11
|
|
|
10
12
|
var _noop2 = _interopRequireDefault(require("lodash/noop"));
|
|
@@ -23,8 +25,6 @@ var _scrollItem = _interopRequireDefault(require("../scrollList/scrollItem"));
|
|
|
23
25
|
|
|
24
26
|
var _index2 = require("@douyinfe/semi-foundation/lib/cjs/datePicker/_utils/index");
|
|
25
27
|
|
|
26
|
-
var _isNullOrUndefined = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/utils/isNullOrUndefined"));
|
|
27
|
-
|
|
28
28
|
var _iconButton = _interopRequireDefault(require("../iconButton"));
|
|
29
29
|
|
|
30
30
|
var _semiIcons = require("@douyinfe/semi-icons");
|
|
@@ -44,12 +44,12 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
44
44
|
constructor(props) {
|
|
45
45
|
super(props);
|
|
46
46
|
|
|
47
|
-
this.selectYear = item => {
|
|
48
|
-
this.foundation.selectYear(item);
|
|
47
|
+
this.selectYear = (item, panelType) => {
|
|
48
|
+
this.foundation.selectYear(item, panelType);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
this.selectMonth = item => {
|
|
52
|
-
this.foundation.selectMonth(item);
|
|
51
|
+
this.selectMonth = (item, panelType) => {
|
|
52
|
+
this.foundation.selectMonth(item, panelType);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
this.reselect = () => {
|
|
@@ -73,8 +73,16 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
73
73
|
currentYear,
|
|
74
74
|
currentMonth
|
|
75
75
|
} = props;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const currentLeftYear = currentYear.left || now.getFullYear();
|
|
77
|
+
const currentLeftMonth = currentMonth.left || now.getMonth() + 1;
|
|
78
|
+
currentYear = {
|
|
79
|
+
left: currentLeftYear,
|
|
80
|
+
right: currentLeftYear
|
|
81
|
+
};
|
|
82
|
+
currentMonth = {
|
|
83
|
+
left: currentLeftMonth,
|
|
84
|
+
right: currentMonth.right || currentLeftMonth + 1
|
|
85
|
+
};
|
|
78
86
|
this.state = {
|
|
79
87
|
years: (0, _index2.getYears)().map(year => ({
|
|
80
88
|
value: year,
|
|
@@ -102,6 +110,10 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
102
110
|
setCurrentMonth: currentMonth => this.setState({
|
|
103
111
|
currentMonth
|
|
104
112
|
}),
|
|
113
|
+
setCurrentYearAndMonth: (currentYear, currentMonth) => this.setState({
|
|
114
|
+
currentYear,
|
|
115
|
+
currentMonth
|
|
116
|
+
}),
|
|
105
117
|
notifySelectYear: year => this.props.onSelect({
|
|
106
118
|
currentMonth: this.state.currentMonth,
|
|
107
119
|
currentYear: year
|
|
@@ -110,26 +122,29 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
110
122
|
currentYear: this.state.currentYear,
|
|
111
123
|
currentMonth: month
|
|
112
124
|
}),
|
|
125
|
+
notifySelectYearAndMonth: (year, month) => this.props.onSelect({
|
|
126
|
+
currentYear: year,
|
|
127
|
+
currentMonth: month
|
|
128
|
+
}),
|
|
113
129
|
notifyBackToMain: () => this.props.onBackToMain()
|
|
114
130
|
});
|
|
115
131
|
}
|
|
116
132
|
|
|
117
133
|
static getDerivedStateFromProps(props, state) {
|
|
118
134
|
const willUpdateStates = {};
|
|
119
|
-
const now = new Date();
|
|
120
135
|
|
|
121
|
-
if (!(0,
|
|
122
|
-
willUpdateStates.
|
|
136
|
+
if (!(0, _isEqual2.default)(props.currentYear, state.currentYear) && props.currentYear.left !== 0) {
|
|
137
|
+
willUpdateStates.currentYear = props.currentYear;
|
|
123
138
|
}
|
|
124
139
|
|
|
125
|
-
if ((0,
|
|
126
|
-
willUpdateStates.
|
|
140
|
+
if (!(0, _isEqual2.default)(props.currentMonth, state.currentMonth) && props.currentMonth.left !== 0) {
|
|
141
|
+
willUpdateStates.currentMonth = props.currentMonth;
|
|
127
142
|
}
|
|
128
143
|
|
|
129
144
|
return willUpdateStates;
|
|
130
145
|
}
|
|
131
146
|
|
|
132
|
-
renderColYear() {
|
|
147
|
+
renderColYear(panelType) {
|
|
133
148
|
const {
|
|
134
149
|
years,
|
|
135
150
|
currentYear,
|
|
@@ -142,7 +157,22 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
142
157
|
yearCycled,
|
|
143
158
|
yearAndMonthOpts
|
|
144
159
|
} = this.props;
|
|
145
|
-
const currentDate = (0, _dateFns.setMonth)(Date.now(), currentMonth - 1);
|
|
160
|
+
const currentDate = (0, _dateFns.setMonth)(Date.now(), currentMonth[panelType] - 1);
|
|
161
|
+
const left = _constants2.strings.PANEL_TYPE_LEFT;
|
|
162
|
+
const right = _constants2.strings.PANEL_TYPE_RIGHT;
|
|
163
|
+
|
|
164
|
+
const needDisabled = year => {
|
|
165
|
+
if (panelType === right && currentYear[left]) {
|
|
166
|
+
if (currentMonth[left] <= currentMonth[right]) {
|
|
167
|
+
return currentYear[left] > year;
|
|
168
|
+
} else {
|
|
169
|
+
return currentYear[left] >= year;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return false;
|
|
174
|
+
};
|
|
175
|
+
|
|
146
176
|
const list = years.map(_ref => {
|
|
147
177
|
let {
|
|
148
178
|
value,
|
|
@@ -157,10 +187,11 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
157
187
|
month: month - 1
|
|
158
188
|
}));
|
|
159
189
|
});
|
|
190
|
+
const isRightPanelDisabled = needDisabled(year);
|
|
160
191
|
return {
|
|
161
192
|
year,
|
|
162
193
|
value,
|
|
163
|
-
disabled: isAllMonthDisabled
|
|
194
|
+
disabled: isAllMonthDisabled || isRightPanelDisabled
|
|
164
195
|
};
|
|
165
196
|
});
|
|
166
197
|
|
|
@@ -176,14 +207,14 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
176
207
|
cycled: yearCycled,
|
|
177
208
|
list: list,
|
|
178
209
|
transform: transform,
|
|
179
|
-
selectedIndex: years.findIndex(item => item.value === currentYear),
|
|
210
|
+
selectedIndex: years.findIndex(item => item.value === currentYear[panelType]),
|
|
180
211
|
type: "year",
|
|
181
|
-
onSelect: this.selectYear,
|
|
212
|
+
onSelect: item => this.selectYear(item, panelType),
|
|
182
213
|
mode: "normal"
|
|
183
214
|
}, yearAndMonthOpts));
|
|
184
215
|
}
|
|
185
216
|
|
|
186
|
-
renderColMonth() {
|
|
217
|
+
renderColMonth(panelType) {
|
|
187
218
|
const {
|
|
188
219
|
months,
|
|
189
220
|
currentMonth,
|
|
@@ -199,7 +230,9 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
199
230
|
|
|
200
231
|
let transform = val => val;
|
|
201
232
|
|
|
202
|
-
const currentDate = (0, _dateFns.setYear)(Date.now(), currentYear);
|
|
233
|
+
const currentDate = (0, _dateFns.setYear)(Date.now(), currentYear[panelType]);
|
|
234
|
+
const left = _constants2.strings.PANEL_TYPE_LEFT;
|
|
235
|
+
const right = _constants2.strings.PANEL_TYPE_RIGHT;
|
|
203
236
|
|
|
204
237
|
if (localeCode === 'zh-CN' || localeCode === 'zh-TW') {
|
|
205
238
|
// Only Chinese needs to add [month] after the selected month
|
|
@@ -212,14 +245,15 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
212
245
|
value,
|
|
213
246
|
month
|
|
214
247
|
} = _ref3;
|
|
248
|
+
const isRightPanelDisabled = panelType === right && currentMonth[left] && currentYear[left] === currentYear[right] && currentMonth[left] > month;
|
|
215
249
|
return {
|
|
216
250
|
month,
|
|
217
|
-
disabled: disabledDate((0, _dateFns.setMonth)(currentDate, month - 1)),
|
|
251
|
+
disabled: disabledDate((0, _dateFns.setMonth)(currentDate, month - 1)) || isRightPanelDisabled,
|
|
218
252
|
value: locale.fullMonths[value] // Actual rendered text
|
|
219
253
|
|
|
220
254
|
};
|
|
221
255
|
});
|
|
222
|
-
const selectedIndex = list.findIndex(item => item.month === currentMonth);
|
|
256
|
+
const selectedIndex = list.findIndex(item => item.month === currentMonth[panelType]);
|
|
223
257
|
return /*#__PURE__*/_react.default.createElement(_scrollItem.default, Object.assign({
|
|
224
258
|
ref: this.monthRef,
|
|
225
259
|
cycled: monthCycled,
|
|
@@ -227,11 +261,15 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
227
261
|
transform: transform,
|
|
228
262
|
selectedIndex: selectedIndex,
|
|
229
263
|
type: "month",
|
|
230
|
-
onSelect: this.selectMonth,
|
|
264
|
+
onSelect: item => this.selectMonth(item, panelType),
|
|
231
265
|
mode: 'normal'
|
|
232
266
|
}, yearAndMonthOpts));
|
|
233
267
|
}
|
|
234
268
|
|
|
269
|
+
renderPanel(panelType) {
|
|
270
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_index.default, null, this.renderColYear(panelType), this.renderColMonth(panelType)));
|
|
271
|
+
}
|
|
272
|
+
|
|
235
273
|
render() {
|
|
236
274
|
const {
|
|
237
275
|
locale,
|
|
@@ -239,13 +277,27 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
239
277
|
density,
|
|
240
278
|
presetPosition,
|
|
241
279
|
renderQuickControls,
|
|
242
|
-
renderDateInput
|
|
280
|
+
renderDateInput,
|
|
281
|
+
type
|
|
243
282
|
} = this.props;
|
|
244
|
-
const prefix = `${prefixCls}-yearmonth-header`;
|
|
283
|
+
const prefix = `${prefixCls}-yearmonth-header`;
|
|
284
|
+
const bodyCls = `${prefixCls}-yearmonth-body`; // i18n
|
|
245
285
|
|
|
246
286
|
const selectDateText = locale.selectDate;
|
|
247
287
|
const iconSize = density === 'compact' ? 'default' : 'large';
|
|
248
288
|
const buttonSize = density === 'compact' ? 'small' : 'default';
|
|
289
|
+
const panelTypeLeft = _constants2.strings.PANEL_TYPE_LEFT;
|
|
290
|
+
const panelTypeRight = _constants2.strings.PANEL_TYPE_RIGHT;
|
|
291
|
+
let content = null;
|
|
292
|
+
|
|
293
|
+
if (type === 'month') {
|
|
294
|
+
content = this.renderPanel(panelTypeLeft);
|
|
295
|
+
} else {
|
|
296
|
+
content = /*#__PURE__*/_react.default.createElement("div", {
|
|
297
|
+
className: bodyCls
|
|
298
|
+
}, this.renderPanel(panelTypeLeft), this.renderPanel(panelTypeRight));
|
|
299
|
+
}
|
|
300
|
+
|
|
249
301
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, noBackBtn ? null : /*#__PURE__*/_react.default.createElement("div", {
|
|
250
302
|
className: prefix
|
|
251
303
|
}, /*#__PURE__*/_react.default.createElement(_iconButton.default, {
|
|
@@ -260,14 +312,14 @@ class YearAndMonth extends _baseComponent.default {
|
|
|
260
312
|
style: {
|
|
261
313
|
display: 'flex'
|
|
262
314
|
}
|
|
263
|
-
}, presetPosition === "left" && renderQuickControls, /*#__PURE__*/_react.default.createElement("div", null, renderDateInput,
|
|
315
|
+
}, presetPosition === "left" && type !== 'monthRange' && renderQuickControls, /*#__PURE__*/_react.default.createElement("div", null, renderDateInput, content), presetPosition === "right" && type !== 'monthRange' && renderQuickControls) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderDateInput, content));
|
|
264
316
|
}
|
|
265
317
|
|
|
266
318
|
}
|
|
267
319
|
|
|
268
320
|
YearAndMonth.propTypes = {
|
|
269
|
-
currentYear: _propTypes.default.
|
|
270
|
-
currentMonth: _propTypes.default.
|
|
321
|
+
currentYear: _propTypes.default.object,
|
|
322
|
+
currentMonth: _propTypes.default.object,
|
|
271
323
|
onSelect: _propTypes.default.func,
|
|
272
324
|
locale: _propTypes.default.object,
|
|
273
325
|
localeCode: _propTypes.default.string,
|
|
@@ -278,14 +330,16 @@ YearAndMonth.propTypes = {
|
|
|
278
330
|
density: _propTypes.default.string,
|
|
279
331
|
presetPosition: _propTypes.default.oneOf(_constants2.strings.PRESET_POSITION_SET),
|
|
280
332
|
renderQuickControls: _propTypes.default.node,
|
|
281
|
-
renderDateInput: _propTypes.default.node
|
|
333
|
+
renderDateInput: _propTypes.default.node,
|
|
334
|
+
type: _propTypes.default.oneOf(_constants2.strings.TYPE_SET)
|
|
282
335
|
};
|
|
283
336
|
YearAndMonth.defaultProps = {
|
|
284
337
|
disabledDate: _stubFalse2.default,
|
|
285
338
|
monthCycled: false,
|
|
286
339
|
yearCycled: false,
|
|
287
340
|
noBackBtn: false,
|
|
288
|
-
onSelect: _noop2.default
|
|
341
|
+
onSelect: _noop2.default,
|
|
342
|
+
type: 'month'
|
|
289
343
|
};
|
|
290
344
|
var _default = YearAndMonth;
|
|
291
345
|
exports.default = _default;
|
|
@@ -127,7 +127,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
127
127
|
onDeselect?: (value: string | number | any[] | Record<string, any>, option: Record<string, any>) => void;
|
|
128
128
|
onSelect?: (value: string | number | any[] | Record<string, any>, option: Record<string, any>) => void;
|
|
129
129
|
allowCreate?: boolean;
|
|
130
|
-
triggerRender?: (props?:
|
|
130
|
+
triggerRender?: (props?: import("../select").TriggerRenderProps) => React.ReactNode;
|
|
131
131
|
onClear?: () => void;
|
|
132
132
|
virtualize?: import("../select").virtualListProps;
|
|
133
133
|
onFocus?: (e: React.FocusEvent<Element, Element>) => void;
|
|
@@ -137,12 +137,12 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
137
137
|
preventScroll?: boolean;
|
|
138
138
|
showRestTagsPopover?: boolean;
|
|
139
139
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
140
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
140
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
141
141
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
142
142
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
143
143
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
|
144
144
|
static RadioGroup: React.ComponentType<import("utility-types").Subtract<import("../radio").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
145
|
-
static DatePicker: React.ComponentType<import("utility-types").Subtract<import("../datePicker").DatePickerProps & React.RefAttributes<import("../datePicker
|
|
145
|
+
static DatePicker: React.ComponentType<import("utility-types").Subtract<import("../datePicker").DatePickerProps & React.RefAttributes<import("../datePicker").BaseDatePicker>, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
146
146
|
static TimePicker: React.ComponentType<import("utility-types").Subtract<import("../timePicker").TimePickerProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
147
147
|
static Switch: React.ComponentType<import("utility-types").Subtract<import("../switch").SwitchProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
148
148
|
static Slider: React.ComponentType<import("utility-types").Subtract<import("../slider").SliderProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
package/lib/cjs/form/field.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
75
75
|
onDeselect?: (value: string | number | any[] | Record<string, any>, option: Record<string, any>) => void;
|
|
76
76
|
onSelect?: (value: string | number | any[] | Record<string, any>, option: Record<string, any>) => void;
|
|
77
77
|
allowCreate?: boolean;
|
|
78
|
-
triggerRender?: (props?:
|
|
78
|
+
triggerRender?: (props?: import("../select/index").TriggerRenderProps) => import("react").ReactNode;
|
|
79
79
|
onClear?: () => void;
|
|
80
80
|
virtualize?: import("../select/index").virtualListProps;
|
|
81
81
|
onFocus?: (e: import("react").FocusEvent<Element, Element>) => void;
|
|
@@ -85,7 +85,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
85
85
|
preventScroll?: boolean;
|
|
86
86
|
showRestTagsPopover?: boolean;
|
|
87
87
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
88
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
88
|
+
} & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
89
89
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
90
90
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
91
91
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
package/lib/cjs/input/index.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
|
|
|
83
83
|
showClear: PropTypes.Requireable<boolean>;
|
|
84
84
|
hideSuffix: PropTypes.Requireable<boolean>;
|
|
85
85
|
placeholder: PropTypes.Requireable<any>;
|
|
86
|
-
size: PropTypes.Requireable<"
|
|
86
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
87
87
|
className: PropTypes.Requireable<string>;
|
|
88
88
|
style: PropTypes.Requireable<object>;
|
|
89
89
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
@@ -21,7 +21,7 @@ export default class inputGroup extends BaseComponent<InputGroupProps, InputGrou
|
|
|
21
21
|
static propTypes: {
|
|
22
22
|
className: PropTypes.Requireable<string>;
|
|
23
23
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
24
|
-
size: PropTypes.Requireable<"
|
|
24
|
+
size: PropTypes.Requireable<"default" | "small" | "large">;
|
|
25
25
|
style: PropTypes.Requireable<object>;
|
|
26
26
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
27
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -38,7 +38,8 @@ const local = {
|
|
|
38
38
|
date: 'حدد تاريخ',
|
|
39
39
|
dateTime: 'حدد التاريخ والوقت',
|
|
40
40
|
dateRange: ['تاريخ البدء', 'تاريخ النهاية'],
|
|
41
|
-
dateTimeRange: ['تاريخ البدء', 'تاريخ النهاية']
|
|
41
|
+
dateTimeRange: ['تاريخ البدء', 'تاريخ النهاية'],
|
|
42
|
+
monthRange: ['الشهر الأول', 'الشهر الأخير']
|
|
42
43
|
},
|
|
43
44
|
footer: {
|
|
44
45
|
confirm: 'تؤكد',
|
|
@@ -38,7 +38,8 @@ const local = {
|
|
|
38
38
|
date: 'Datum auswählen',
|
|
39
39
|
dateTime: 'Datum und Uhrzeit auswählen',
|
|
40
40
|
dateRange: ['Startdatum', 'Enddatum'],
|
|
41
|
-
dateTimeRange: ['Startdatum', 'Enddatum']
|
|
41
|
+
dateTimeRange: ['Startdatum', 'Enddatum'],
|
|
42
|
+
monthRange: ['Startmonat', 'Endmonat']
|
|
42
43
|
},
|
|
43
44
|
footer: {
|
|
44
45
|
confirm: 'Bestätigen',
|
|
@@ -38,7 +38,8 @@ const local = {
|
|
|
38
38
|
date: 'Select date',
|
|
39
39
|
dateTime: 'Select date and time',
|
|
40
40
|
dateRange: ['Start date', 'End date'],
|
|
41
|
-
dateTimeRange: ['Start date', 'End date']
|
|
41
|
+
dateTimeRange: ['Start date', 'End date'],
|
|
42
|
+
monthRange: ['Start month', 'End month']
|
|
42
43
|
},
|
|
43
44
|
footer: {
|
|
44
45
|
confirm: 'Confirm',
|
|
@@ -38,7 +38,8 @@ const local = {
|
|
|
38
38
|
date: 'Select date',
|
|
39
39
|
dateTime: 'Select date and time',
|
|
40
40
|
dateRange: ['Start date', 'End date'],
|
|
41
|
-
dateTimeRange: ['Start date', 'End date']
|
|
41
|
+
dateTimeRange: ['Start date', 'End date'],
|
|
42
|
+
monthRange: ['Start month', 'End month']
|
|
42
43
|
},
|
|
43
44
|
footer: {
|
|
44
45
|
confirm: 'Confirm',
|
|
@@ -42,7 +42,8 @@ const locale = {
|
|
|
42
42
|
date: 'Seleccionar fecha',
|
|
43
43
|
dateTime: 'Seleccionar hora y fecha',
|
|
44
44
|
dateRange: ['Fecha inicial', 'Fecha final'],
|
|
45
|
-
dateTimeRange: ['Fecha inicial', 'Fecha final']
|
|
45
|
+
dateTimeRange: ['Fecha inicial', 'Fecha final'],
|
|
46
|
+
monthRange: ['Mes inicial', 'Mes final']
|
|
46
47
|
},
|
|
47
48
|
footer: {
|
|
48
49
|
confirm: 'Aceptar',
|
|
@@ -38,7 +38,8 @@ const local = {
|
|
|
38
38
|
date: 'Sélectionner date',
|
|
39
39
|
dateTime: 'Sélectionner date et temps',
|
|
40
40
|
dateRange: ['Date de début', 'Date de fin'],
|
|
41
|
-
dateTimeRange: ['Date de début', 'Date de fin']
|
|
41
|
+
dateTimeRange: ['Date de début', 'Date de fin'],
|
|
42
|
+
monthRange: ['Mois de début', 'Mois de fin']
|
|
42
43
|
},
|
|
43
44
|
footer: {
|
|
44
45
|
confirm: 'Confirmer',
|
|
@@ -38,7 +38,8 @@ const local = {
|
|
|
38
38
|
date: 'Pilih tanggal',
|
|
39
39
|
dateTime: 'Pilih tanggal dan waktu',
|
|
40
40
|
dateRange: ['Tanggal mulai', 'Tanggal akhir'],
|
|
41
|
-
dateTimeRange: ['Tanggal mulai', 'Tanggal akhir']
|
|
41
|
+
dateTimeRange: ['Tanggal mulai', 'Tanggal akhir'],
|
|
42
|
+
monthRange: ['Bulan pertama', 'Bulan terakhir']
|
|
42
43
|
},
|
|
43
44
|
footer: {
|
|
44
45
|
confirm: 'Konfirmasi',
|
|
@@ -38,7 +38,8 @@ const local = {
|
|
|
38
38
|
date: 'Seleziona data',
|
|
39
39
|
dateTime: 'Seleziona data e ora',
|
|
40
40
|
dateRange: ['Data inizio', 'Data fine'],
|
|
41
|
-
dateTimeRange: ['Data inizio', 'Data fine']
|
|
41
|
+
dateTimeRange: ['Data inizio', 'Data fine'],
|
|
42
|
+
monthRange: ['Mese inizio', 'Mese fine']
|
|
42
43
|
},
|
|
43
44
|
footer: {
|
|
44
45
|
confirm: 'Conferma',
|
|
@@ -38,7 +38,8 @@ const local = {
|
|
|
38
38
|
date: 'Pilih tarikh',
|
|
39
39
|
dateTime: 'Pilih tarikh dan masa',
|
|
40
40
|
dateRange: ['Tarikh mula', 'Tarikh akhir'],
|
|
41
|
-
dateTimeRange: ['Tarikh mula', 'Tarikh akhir']
|
|
41
|
+
dateTimeRange: ['Tarikh mula', 'Tarikh akhir'],
|
|
42
|
+
monthRange: ['Bulan mula', 'Bulan akhir']
|
|
42
43
|
},
|
|
43
44
|
footer: {
|
|
44
45
|
confirm: 'Sahkan',
|
|
@@ -43,7 +43,8 @@ const local = {
|
|
|
43
43
|
date: 'Datum selecteren',
|
|
44
44
|
dateTime: 'Datum en tijd selecteren',
|
|
45
45
|
dateRange: ['Begindatum', 'Einddatum'],
|
|
46
|
-
dateTimeRange: ['Begindatum', 'Einddatum']
|
|
46
|
+
dateTimeRange: ['Begindatum', 'Einddatum'],
|
|
47
|
+
monthRange: ['Begindatum', 'Einddatum']
|
|
47
48
|
},
|
|
48
49
|
footer: {
|
|
49
50
|
confirm: 'Bevestigen',
|
|
@@ -43,7 +43,8 @@ const local = {
|
|
|
43
43
|
date: 'Wybierz datę',
|
|
44
44
|
dateTime: 'Wybierz datę i godzinę',
|
|
45
45
|
dateRange: ['Data rozpoczęcia', 'Data zakończenia'],
|
|
46
|
-
dateTimeRange: ['Data rozpoczęcia', 'Data zakończenia']
|
|
46
|
+
dateTimeRange: ['Data rozpoczęcia', 'Data zakończenia'],
|
|
47
|
+
monthRange: ['Miesiąc rozpoczęcia', 'Miesiąc zakończenia']
|
|
47
48
|
},
|
|
48
49
|
footer: {
|
|
49
50
|
confirm: 'Potwierdź',
|
|
@@ -38,7 +38,8 @@ const local = {
|
|
|
38
38
|
date: 'Por favor selecione uma data',
|
|
39
39
|
dateTime: 'Selecione a data e hora',
|
|
40
40
|
dateRange: ['Data de início', 'Data de fim'],
|
|
41
|
-
dateTimeRange: ['Data de início', 'Data de fim']
|
|
41
|
+
dateTimeRange: ['Data de início', 'Data de fim'],
|
|
42
|
+
monthRange: ['Mês de início', 'Mês de fim']
|
|
42
43
|
},
|
|
43
44
|
footer: {
|
|
44
45
|
confirm: 'OK',
|
|
@@ -41,7 +41,8 @@ var _default = {
|
|
|
41
41
|
date: 'Selectează data',
|
|
42
42
|
dateTime: 'Selectează data și ora',
|
|
43
43
|
dateRange: ['Data de început', 'Data de sfârșit'],
|
|
44
|
-
dateTimeRange: ['Data de început', 'Data de sfârșit']
|
|
44
|
+
dateTimeRange: ['Data de început', 'Data de sfârșit'],
|
|
45
|
+
monthRange: ['Luna de început', 'Luna de sfârșit']
|
|
45
46
|
},
|
|
46
47
|
footer: {
|
|
47
48
|
confirm: 'Confirmă',
|
|
@@ -41,7 +41,8 @@ const local = {
|
|
|
41
41
|
date: 'Выбрать дату',
|
|
42
42
|
dateTime: 'Выбрать дату и время',
|
|
43
43
|
dateRange: ['Дата начала', 'Дата окончания'],
|
|
44
|
-
dateTimeRange: ['Дата начала', 'Дата окончания']
|
|
44
|
+
dateTimeRange: ['Дата начала', 'Дата окончания'],
|
|
45
|
+
monthRange: ['Начальный месяц', 'Конечный месяц']
|
|
45
46
|
},
|
|
46
47
|
footer: {
|
|
47
48
|
confirm: 'подтвердить',
|
|
@@ -42,7 +42,8 @@ const local = {
|
|
|
42
42
|
date: 'Välj datum',
|
|
43
43
|
dateTime: 'Välj datum och tid',
|
|
44
44
|
dateRange: ['Startdatum', 'Slutdatum'],
|
|
45
|
-
dateTimeRange: ['Startdatum', 'Slutdatum']
|
|
45
|
+
dateTimeRange: ['Startdatum', 'Slutdatum'],
|
|
46
|
+
monthRange: ['Startmånad', 'Slutmånad']
|
|
46
47
|
},
|
|
47
48
|
footer: {
|
|
48
49
|
confirm: 'Bekräfta',
|
|
@@ -41,7 +41,8 @@ const local = {
|
|
|
41
41
|
date: 'โปรดเลือกวันที่',
|
|
42
42
|
dateTime: 'โปรดเลือกวันที่และเวลา',
|
|
43
43
|
dateRange: ['วันที่เริ่มต้น', 'วันที่สิ้นสุด'],
|
|
44
|
-
dateTimeRange: ['วันที่เริ่มต้น', 'วันที่สิ้นสุด']
|
|
44
|
+
dateTimeRange: ['วันที่เริ่มต้น', 'วันที่สิ้นสุด'],
|
|
45
|
+
monthRange: ['เดือนเริ่มต้น', 'เดือนสิ้นสุด']
|
|
45
46
|
},
|
|
46
47
|
footer: {
|
|
47
48
|
confirm: 'ตกลง',
|
|
@@ -41,7 +41,8 @@ const local = {
|
|
|
41
41
|
date: 'Lütfen bir tarih seçin',
|
|
42
42
|
dateTime: 'Lütfen bir tarih ve saat seçin',
|
|
43
43
|
dateRange: ['Başlangıç tarihi', 'Bitiş tarihi'],
|
|
44
|
-
dateTimeRange: ['Başlangıç tarihi', 'Bitiş tarihi']
|
|
44
|
+
dateTimeRange: ['Başlangıç tarihi', 'Bitiş tarihi'],
|
|
45
|
+
monthRange: ['Başlangıç ayı', 'Bitiş ayı']
|
|
45
46
|
},
|
|
46
47
|
footer: {
|
|
47
48
|
confirm: 'Tamam',
|
|
@@ -41,7 +41,8 @@ const local = {
|
|
|
41
41
|
date: 'Chọn ngày',
|
|
42
42
|
dateTime: 'Chọn ngày và giờ',
|
|
43
43
|
dateRange: ['Ngày bắt đầu', 'Ngày kết thúc'],
|
|
44
|
-
dateTimeRange: ['Ngày bắt đầu', 'Ngày kết thúc']
|
|
44
|
+
dateTimeRange: ['Ngày bắt đầu', 'Ngày kết thúc'],
|
|
45
|
+
monthRange: ['Tháng bắt đầu', 'Tháng kết thúc']
|
|
45
46
|
},
|
|
46
47
|
footer: {
|
|
47
48
|
confirm: 'Xác nhận',
|