feffery_antd_components 0.2.10-rc15 → 0.2.10-rc16
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/DESCRIPTION +1 -1
- package/Project.toml +1 -1
- package/build/lib/feffery_antd_components/__init__.py +1 -1
- package/build/lib/feffery_antd_components/async-antd_table.js +1 -1
- package/build/lib/feffery_antd_components/async-antd_upload.js +1 -1
- package/build/lib/feffery_antd_components/async-data_entry.js +1 -0
- package/build/lib/feffery_antd_components/feffery_antd_components.min.js +1 -1
- package/build/lib/feffery_antd_components/package-info.json +1 -1
- package/feffery_antd_components/__init__.py +1 -1
- package/feffery_antd_components/async-antd_table.js +1 -1
- package/feffery_antd_components/async-antd_upload.js +1 -1
- package/feffery_antd_components/async-data_entry.js +1 -0
- package/feffery_antd_components/feffery_antd_components.min.js +1 -1
- package/feffery_antd_components/package-info.json +1 -1
- package/package.json +1 -1
- package/src/lib/components/dataEntry/AntdCascader.react.js +9 -147
- package/src/lib/components/dataEntry/AntdCheckbox.react.js +9 -74
- package/src/lib/components/dataEntry/AntdCheckboxGroup.react.js +9 -71
- package/src/lib/components/dataEntry/AntdDatePicker.react.js +10 -425
- package/src/lib/components/dataEntry/AntdDateRangePicker.react.js +9 -446
- package/src/lib/components/dataEntry/AntdInput.react.js +11 -325
- package/src/lib/components/dataEntry/AntdInputNumber.react.js +9 -134
- package/src/lib/components/dataEntry/AntdMentions.react.js +9 -113
- package/src/lib/components/dataEntry/AntdRadioGroup.react.js +9 -135
- package/src/lib/components/dataEntry/AntdRate.react.js +9 -76
- package/src/lib/components/dataEntry/AntdSegmentedColoring.react.js +9 -206
- package/src/lib/components/dataEntry/AntdSelect.react.js +10 -288
- package/src/lib/components/dataEntry/AntdSlider.react.js +9 -123
- package/src/lib/components/dataEntry/AntdSwitch.react.js +9 -84
- package/src/lib/components/dataEntry/AntdTimePicker.react.js +9 -125
- package/src/lib/components/dataEntry/AntdTimeRangePicker.react.js +9 -141
- package/src/lib/components/dataEntry/AntdTransfer.react.js +9 -132
- package/src/lib/components/dataEntry/AntdTreeSelect.react.js +11 -207
- package/src/lib/components/dataEntry/check-card/AntdCheckCard.react.js +10 -66
- package/src/lib/components/dataEntry/check-card/AntdCheckCardGroup.react.js +10 -79
- package/src/lib/components/dataEntry/form/AntdForm.react.js +9 -42
- package/src/lib/components/dataEntry/form/AntdFormItem.react.js +9 -54
- package/src/lib/fragments/AntdTable.react.js +29 -12
- package/src/lib/fragments/dataEntry/AntdCascader.react.js +157 -0
- package/src/lib/fragments/dataEntry/AntdCheckbox.react.js +85 -0
- package/src/lib/fragments/dataEntry/AntdCheckboxGroup.react.js +82 -0
- package/src/lib/fragments/dataEntry/AntdDatePicker.react.js +436 -0
- package/src/lib/fragments/dataEntry/AntdDateRangePicker.react.js +458 -0
- package/src/lib/fragments/dataEntry/AntdInput.react.js +333 -0
- package/src/lib/fragments/dataEntry/AntdInputNumber.react.js +145 -0
- package/src/lib/fragments/dataEntry/AntdMentions.react.js +124 -0
- package/src/lib/fragments/dataEntry/AntdRadioGroup.react.js +146 -0
- package/src/lib/fragments/dataEntry/AntdRate.react.js +87 -0
- package/src/lib/fragments/dataEntry/AntdSegmentedColoring.react.js +219 -0
- package/src/lib/fragments/dataEntry/AntdSelect.react.js +298 -0
- package/src/lib/fragments/dataEntry/AntdSlider.react.js +134 -0
- package/src/lib/fragments/dataEntry/AntdSwitch.react.js +95 -0
- package/src/lib/fragments/dataEntry/AntdTimePicker.react.js +136 -0
- package/src/lib/fragments/dataEntry/AntdTimeRangePicker.react.js +152 -0
- package/src/lib/fragments/dataEntry/AntdTransfer.react.js +143 -0
- package/src/lib/fragments/dataEntry/AntdTreeSelect.react.js +216 -0
- package/src/lib/fragments/dataEntry/check-card/AntdCheckCard.react.js +77 -0
- package/src/lib/fragments/dataEntry/check-card/AntdCheckCardGroup.react.js +89 -0
- package/src/lib/fragments/dataEntry/form/AntdForm.react.js +53 -0
- package/src/lib/fragments/dataEntry/form/AntdFormItem.react.js +65 -0
- package/usage.py +94 -51
|
@@ -1,454 +1,14 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { Suspense } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { DatePicker, ConfigProvider } from 'antd';
|
|
4
|
-
import moment from 'moment';
|
|
5
3
|
import "moment/locale/zh-cn";
|
|
6
|
-
import { isString, isUndefined, isObject } from 'lodash';
|
|
7
|
-
import { str2Locale } from '../locales.react';
|
|
8
|
-
import useCss from '../../hooks/useCss';
|
|
9
|
-
import PropsContext from '../../contexts/PropsContext';
|
|
10
4
|
|
|
11
|
-
const
|
|
5
|
+
const LazyAntdDateRangePicker = React.lazy(() => import(/* webpackChunkName: "data_entry" */ '../../fragments/dataEntry/AntdDateRangePicker.react'));
|
|
12
6
|
|
|
13
|
-
// 定义日期范围选择组件AntdDateRangePicker,api参数参考https://ant.design/components/date-picker-cn/
|
|
14
7
|
const AntdDateRangePicker = (props) => {
|
|
15
|
-
// 取得必要属性或参数
|
|
16
|
-
let {
|
|
17
|
-
id,
|
|
18
|
-
className,
|
|
19
|
-
style,
|
|
20
|
-
key,
|
|
21
|
-
locale,
|
|
22
|
-
setProps,
|
|
23
|
-
picker,
|
|
24
|
-
firstDayOfWeek,
|
|
25
|
-
format,
|
|
26
|
-
showTime,
|
|
27
|
-
allowClear,
|
|
28
|
-
value,
|
|
29
|
-
disabledDatesStrategy,
|
|
30
|
-
open,
|
|
31
|
-
defaultValue,
|
|
32
|
-
placeholder,
|
|
33
|
-
disabled,
|
|
34
|
-
bordered,
|
|
35
|
-
size,
|
|
36
|
-
defaultPickerValue,
|
|
37
|
-
status,
|
|
38
|
-
popupContainer,
|
|
39
|
-
readOnly,
|
|
40
|
-
placement,
|
|
41
|
-
extraFooter,
|
|
42
|
-
persistence,
|
|
43
|
-
persisted_props,
|
|
44
|
-
persistence_type,
|
|
45
|
-
loading_state,
|
|
46
|
-
batchPropsNames
|
|
47
|
-
} = props;
|
|
48
|
-
|
|
49
|
-
// 批属性监听
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
if (batchPropsNames && batchPropsNames.length !== 0) {
|
|
52
|
-
let _batchPropsValues = {};
|
|
53
|
-
for (let propName of batchPropsNames) {
|
|
54
|
-
_batchPropsValues[propName] = props[propName];
|
|
55
|
-
}
|
|
56
|
-
setProps({
|
|
57
|
-
batchPropsValues: _batchPropsValues
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
const context = useContext(PropsContext)
|
|
63
|
-
locale = (context && context.locale) || locale
|
|
64
|
-
|
|
65
|
-
useEffect(() => {
|
|
66
|
-
// 初始化value
|
|
67
|
-
if (defaultValue && !value) {
|
|
68
|
-
// 当defaultValue不为空且value为空时,为value初始化defaultValue对应值
|
|
69
|
-
setProps({ value: defaultValue })
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// 调整不同showTime下的format缺省参数
|
|
73
|
-
if (showTime && !format) {
|
|
74
|
-
setProps({
|
|
75
|
-
format: 'YYYY-MM-DD HH:mm:ss'
|
|
76
|
-
})
|
|
77
|
-
} else if (!showTime && !format) {
|
|
78
|
-
setProps({
|
|
79
|
-
format: 'YYYY-MM-DD'
|
|
80
|
-
})
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// defaultPickerValue为空时默认定位到今日对应面板位置
|
|
84
|
-
if (!defaultPickerValue) {
|
|
85
|
-
setProps({
|
|
86
|
-
defaultPickerValue: moment(new Date()).format(format || 'YYYY-MM-DD')
|
|
87
|
-
})
|
|
88
|
-
}
|
|
89
|
-
}, [])
|
|
90
|
-
|
|
91
|
-
useEffect(() => {
|
|
92
|
-
if (!isUndefined(firstDayOfWeek)) {
|
|
93
|
-
moment.locale(
|
|
94
|
-
locale === 'en-us' ? 'en' : locale,
|
|
95
|
-
{
|
|
96
|
-
week: {
|
|
97
|
-
dow: firstDayOfWeek
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
}, [firstDayOfWeek])
|
|
103
|
-
|
|
104
|
-
const onChange = (date, dateString) => {
|
|
105
|
-
if (Array.isArray(dateString)) {
|
|
106
|
-
if (dateString[0] !== '' && dateString[1] !== '') {
|
|
107
|
-
setProps({ value: [dateString[0], dateString[1]] })
|
|
108
|
-
} else {
|
|
109
|
-
setProps({ value: null })
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const checkDisabledDate = current => {
|
|
115
|
-
|
|
116
|
-
// 根据disabledDatesStrategy设定的各个子条件进行是否禁用判断
|
|
117
|
-
for (let i = 0; i < disabledDatesStrategy.length; i++) {
|
|
118
|
-
let strategy = disabledDatesStrategy[i];
|
|
119
|
-
// 判断当前子策略方式
|
|
120
|
-
if (strategy.mode === 'eq') {
|
|
121
|
-
// 判断当前子策略约束目标
|
|
122
|
-
if (strategy.target === 'day') {
|
|
123
|
-
if (current.date() === strategy.value) {
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
} else if (strategy.target === 'month') {
|
|
127
|
-
if (current.month() === strategy.value) {
|
|
128
|
-
return true;
|
|
129
|
-
}
|
|
130
|
-
} else if (strategy.target === 'quarter') {
|
|
131
|
-
if (current.quarter() === strategy.value) {
|
|
132
|
-
return true;
|
|
133
|
-
}
|
|
134
|
-
} else if (strategy.target === 'year') {
|
|
135
|
-
if (current.year() === strategy.value) {
|
|
136
|
-
return true;
|
|
137
|
-
}
|
|
138
|
-
} else if (strategy.target === 'dayOfYear') {
|
|
139
|
-
if (current.dayOfYear() === strategy.value) {
|
|
140
|
-
return true;
|
|
141
|
-
}
|
|
142
|
-
} else if (strategy.target === 'dayOfWeek') {
|
|
143
|
-
if (current.isoWeekday() === strategy.value) {
|
|
144
|
-
return true;
|
|
145
|
-
}
|
|
146
|
-
} else if (strategy.target === 'specific-date') {
|
|
147
|
-
if (current.isSame(moment(strategy.value, 'YYYY-MM-DD'))) {
|
|
148
|
-
return true;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
} else if (strategy.mode === 'ne') {
|
|
152
|
-
// 判断当前子策略约束目标
|
|
153
|
-
if (strategy.target === 'day') {
|
|
154
|
-
if (current.date() !== strategy.value) {
|
|
155
|
-
return true;
|
|
156
|
-
}
|
|
157
|
-
} else if (strategy.target === 'month') {
|
|
158
|
-
if (current.month() !== strategy.value) {
|
|
159
|
-
return true;
|
|
160
|
-
}
|
|
161
|
-
} else if (strategy.target === 'quarter') {
|
|
162
|
-
if (current.quarter() !== strategy.value) {
|
|
163
|
-
return true;
|
|
164
|
-
}
|
|
165
|
-
} else if (strategy.target === 'year') {
|
|
166
|
-
if (current.year() !== strategy.value) {
|
|
167
|
-
return true;
|
|
168
|
-
}
|
|
169
|
-
} else if (strategy.target === 'dayOfYear') {
|
|
170
|
-
if (current.dayOfYear() !== strategy.value) {
|
|
171
|
-
return true;
|
|
172
|
-
}
|
|
173
|
-
} else if (strategy.target === 'dayOfWeek') {
|
|
174
|
-
if (current.isoWeekday() !== strategy.value) {
|
|
175
|
-
return true;
|
|
176
|
-
}
|
|
177
|
-
} else if (strategy.target === 'specific-date') {
|
|
178
|
-
if (!current.isSame(moment(strategy.value, 'YYYY-MM-DD'))) {
|
|
179
|
-
return true;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
} else if (strategy.mode === 'le') {
|
|
183
|
-
// 判断当前子策略约束目标
|
|
184
|
-
if (strategy.target === 'day') {
|
|
185
|
-
if (current.date() <= strategy.value) {
|
|
186
|
-
return true;
|
|
187
|
-
}
|
|
188
|
-
} else if (strategy.target === 'month') {
|
|
189
|
-
if (current.month() <= strategy.value) {
|
|
190
|
-
return true;
|
|
191
|
-
}
|
|
192
|
-
} else if (strategy.target === 'quarter') {
|
|
193
|
-
if (current.quarter() <= strategy.value) {
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
} else if (strategy.target === 'year') {
|
|
197
|
-
if (current.year() <= strategy.value) {
|
|
198
|
-
return true;
|
|
199
|
-
}
|
|
200
|
-
} else if (strategy.target === 'dayOfYear') {
|
|
201
|
-
if (current.dayOfYear() <= strategy.value) {
|
|
202
|
-
return true;
|
|
203
|
-
}
|
|
204
|
-
} else if (strategy.target === 'dayOfWeek') {
|
|
205
|
-
if (current.isoWeekday() <= strategy.value) {
|
|
206
|
-
return true;
|
|
207
|
-
}
|
|
208
|
-
} else if (strategy.target === 'specific-date') {
|
|
209
|
-
if (current.isSameOrBefore(moment(strategy.value, 'YYYY-MM-DD'))) {
|
|
210
|
-
return true;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
} else if (strategy.mode === 'lt') {
|
|
214
|
-
// 判断当前子策略约束目标
|
|
215
|
-
if (strategy.target === 'day') {
|
|
216
|
-
if (current.date() < strategy.value) {
|
|
217
|
-
return true;
|
|
218
|
-
}
|
|
219
|
-
} else if (strategy.target === 'month') {
|
|
220
|
-
if (current.month() < strategy.value) {
|
|
221
|
-
return true;
|
|
222
|
-
}
|
|
223
|
-
} else if (strategy.target === 'quarter') {
|
|
224
|
-
if (current.quarter() < strategy.value) {
|
|
225
|
-
return true;
|
|
226
|
-
}
|
|
227
|
-
} else if (strategy.target === 'year') {
|
|
228
|
-
if (current.year() < strategy.value) {
|
|
229
|
-
return true;
|
|
230
|
-
}
|
|
231
|
-
} else if (strategy.target === 'dayOfYear') {
|
|
232
|
-
if (current.dayOfYear() < strategy.value) {
|
|
233
|
-
return true;
|
|
234
|
-
}
|
|
235
|
-
} else if (strategy.target === 'dayOfWeek') {
|
|
236
|
-
if (current.isoWeekday() < strategy.value) {
|
|
237
|
-
return true;
|
|
238
|
-
}
|
|
239
|
-
} else if (strategy.target === 'specific-date') {
|
|
240
|
-
if (current.isBefore(moment(strategy.value, 'YYYY-MM-DD'))) {
|
|
241
|
-
return true;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
} else if (strategy.mode === 'ge') {
|
|
245
|
-
// 判断当前子策略约束目标
|
|
246
|
-
if (strategy.target === 'day') {
|
|
247
|
-
if (current.date() >= strategy.value) {
|
|
248
|
-
return true;
|
|
249
|
-
}
|
|
250
|
-
} else if (strategy.target === 'month') {
|
|
251
|
-
if (current.month() >= strategy.value) {
|
|
252
|
-
return true;
|
|
253
|
-
}
|
|
254
|
-
} else if (strategy.target === 'quarter') {
|
|
255
|
-
if (current.quarter() >= strategy.value) {
|
|
256
|
-
return true;
|
|
257
|
-
}
|
|
258
|
-
} else if (strategy.target === 'year') {
|
|
259
|
-
if (current.year() >= strategy.value) {
|
|
260
|
-
return true;
|
|
261
|
-
}
|
|
262
|
-
} else if (strategy.target === 'dayOfYear') {
|
|
263
|
-
if (current.dayOfYear() >= strategy.value) {
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
|
-
} else if (strategy.target === 'dayOfWeek') {
|
|
267
|
-
if (current.isoWeekday() >= strategy.value) {
|
|
268
|
-
return true;
|
|
269
|
-
}
|
|
270
|
-
} else if (strategy.target === 'specific-date') {
|
|
271
|
-
if (current.isSameOrAfter(moment(strategy.value, 'YYYY-MM-DD'))) {
|
|
272
|
-
return true;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
} else if (strategy.mode === 'gt') {
|
|
276
|
-
// 判断当前子策略约束目标
|
|
277
|
-
if (strategy.target === 'day') {
|
|
278
|
-
if (current.date() > strategy.value) {
|
|
279
|
-
return true;
|
|
280
|
-
}
|
|
281
|
-
} else if (strategy.target === 'month') {
|
|
282
|
-
if (current.month() > strategy.value) {
|
|
283
|
-
return true;
|
|
284
|
-
}
|
|
285
|
-
} else if (strategy.target === 'quarter') {
|
|
286
|
-
if (current.quarter() > strategy.value) {
|
|
287
|
-
return true;
|
|
288
|
-
}
|
|
289
|
-
} else if (strategy.target === 'year') {
|
|
290
|
-
if (current.year() > strategy.value) {
|
|
291
|
-
return true;
|
|
292
|
-
}
|
|
293
|
-
} else if (strategy.target === 'dayOfYear') {
|
|
294
|
-
if (current.dayOfYear() > strategy.value) {
|
|
295
|
-
return true;
|
|
296
|
-
}
|
|
297
|
-
} else if (strategy.target === 'dayOfWeek') {
|
|
298
|
-
if (current.isoWeekday() > strategy.value) {
|
|
299
|
-
return true;
|
|
300
|
-
}
|
|
301
|
-
} else if (strategy.target === 'specific-date') {
|
|
302
|
-
if (current.isAfter(moment(strategy.value, 'YYYY-MM-DD'))) {
|
|
303
|
-
return true;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
} else if (strategy.mode === 'in') {
|
|
307
|
-
// 判断当前子策略约束目标
|
|
308
|
-
if (strategy.target === 'day') {
|
|
309
|
-
if (strategy.value.includes(current.date())) {
|
|
310
|
-
return true;
|
|
311
|
-
}
|
|
312
|
-
} else if (strategy.target === 'month') {
|
|
313
|
-
if (strategy.value.includes(current.month())) {
|
|
314
|
-
return true;
|
|
315
|
-
}
|
|
316
|
-
} else if (strategy.target === 'quarter') {
|
|
317
|
-
if (strategy.value.includes(current.quarter())) {
|
|
318
|
-
return true;
|
|
319
|
-
}
|
|
320
|
-
} else if (strategy.target === 'year') {
|
|
321
|
-
if (strategy.value.includes(current.year())) {
|
|
322
|
-
return true;
|
|
323
|
-
}
|
|
324
|
-
} else if (strategy.target === 'dayOfYear') {
|
|
325
|
-
if (strategy.value.includes(current.dayOfYear())) {
|
|
326
|
-
return true;
|
|
327
|
-
}
|
|
328
|
-
} else if (strategy.target === 'dayOfWeek') {
|
|
329
|
-
if (strategy.value.includes(current.isoWeekday())) {
|
|
330
|
-
return true;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
} else if (strategy.mode === 'not-in') {
|
|
334
|
-
// 判断当前子策略约束目标
|
|
335
|
-
if (strategy.target === 'day') {
|
|
336
|
-
if (!strategy.value.includes(current.date())) {
|
|
337
|
-
return true;
|
|
338
|
-
}
|
|
339
|
-
} else if (strategy.target === 'month') {
|
|
340
|
-
if (!strategy.value.includes(current.month())) {
|
|
341
|
-
return true;
|
|
342
|
-
}
|
|
343
|
-
} else if (strategy.target === 'quarter') {
|
|
344
|
-
if (!strategy.value.includes(current.quarter())) {
|
|
345
|
-
return true;
|
|
346
|
-
}
|
|
347
|
-
} else if (strategy.target === 'year') {
|
|
348
|
-
if (!strategy.value.includes(current.year())) {
|
|
349
|
-
return true;
|
|
350
|
-
}
|
|
351
|
-
} else if (strategy.target === 'dayOfYear') {
|
|
352
|
-
if (!strategy.value.includes(current.dayOfYear())) {
|
|
353
|
-
return true;
|
|
354
|
-
}
|
|
355
|
-
} else if (strategy.target === 'dayOfWeek') {
|
|
356
|
-
if (!strategy.value.includes(current.isoWeekday())) {
|
|
357
|
-
return true;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
} else if (strategy.mode === 'in-enumerate-dates') {
|
|
361
|
-
if (strategy.value.includes(current.format(format))) {
|
|
362
|
-
return true;
|
|
363
|
-
}
|
|
364
|
-
} else if (strategy.mode === 'not-in-enumerate-dates') {
|
|
365
|
-
if (!strategy.value.includes(current.format(format))) {
|
|
366
|
-
return true;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
// 返回定制化的前端组件
|
|
373
8
|
return (
|
|
374
|
-
<
|
|
375
|
-
<
|
|
376
|
-
|
|
377
|
-
id={id}
|
|
378
|
-
className={
|
|
379
|
-
isString(className) ?
|
|
380
|
-
className :
|
|
381
|
-
(className ? useCss(className) : undefined)
|
|
382
|
-
}
|
|
383
|
-
style={style}
|
|
384
|
-
key={key}
|
|
385
|
-
format={format}
|
|
386
|
-
size={
|
|
387
|
-
context && !isUndefined(context.componentSize) ?
|
|
388
|
-
context.componentSize :
|
|
389
|
-
size
|
|
390
|
-
}
|
|
391
|
-
picker={picker}
|
|
392
|
-
showTime={
|
|
393
|
-
// 处理时间选择面板在日期选定后的默认选中值
|
|
394
|
-
isObject(showTime) && showTime.defaultValue ?
|
|
395
|
-
{
|
|
396
|
-
defaultValue: [
|
|
397
|
-
moment(showTime.defaultValue[0], showTime.format || 'HH:mm:ss'),
|
|
398
|
-
moment(showTime.defaultValue[1], showTime.format || 'HH:mm:ss')
|
|
399
|
-
]
|
|
400
|
-
} :
|
|
401
|
-
showTime
|
|
402
|
-
}
|
|
403
|
-
allowClear={isUndefined(readOnly) ? allowClear : !readOnly}
|
|
404
|
-
disabled={
|
|
405
|
-
context && !isUndefined(context.componentDisabled) ?
|
|
406
|
-
[context.componentDisabled, context.componentDisabled] :
|
|
407
|
-
(
|
|
408
|
-
(disabled && disabled.length === 2) ? disabled : undefined
|
|
409
|
-
)}
|
|
410
|
-
allowEmpty={(disabled && disabled.length === 2) ? disabled : undefined}
|
|
411
|
-
placeholder={(placeholder && placeholder.length === 2) ? placeholder : undefined}
|
|
412
|
-
onChange={onChange}
|
|
413
|
-
bordered={bordered}
|
|
414
|
-
disabledDate={disabledDatesStrategy ? checkDisabledDate : undefined}
|
|
415
|
-
defaultPickerValue={
|
|
416
|
-
defaultPickerValue ?
|
|
417
|
-
[moment(defaultPickerValue, format), moment(defaultPickerValue, format)] :
|
|
418
|
-
undefined
|
|
419
|
-
}
|
|
420
|
-
value={
|
|
421
|
-
(value && value.length === 2) ?
|
|
422
|
-
[value[0] ? moment(value[0], format) : undefined,
|
|
423
|
-
value[1] ? moment(value[1], format) : undefined] :
|
|
424
|
-
undefined
|
|
425
|
-
}
|
|
426
|
-
defaultValue={
|
|
427
|
-
(defaultValue && defaultValue.length === 2) ?
|
|
428
|
-
[defaultValue[0] ? moment(defaultValue[0], format) : undefined,
|
|
429
|
-
defaultValue[1] ? moment(defaultValue[1], format) : undefined] :
|
|
430
|
-
undefined
|
|
431
|
-
}
|
|
432
|
-
status={status}
|
|
433
|
-
placement={placement}
|
|
434
|
-
open={isUndefined(readOnly) || !readOnly ? open : false}
|
|
435
|
-
onOpenChange={(e) => setProps({ open: e })}
|
|
436
|
-
inputReadOnly={readOnly}
|
|
437
|
-
renderExtraFooter={() => extraFooter}
|
|
438
|
-
persistence={persistence}
|
|
439
|
-
persisted_props={persisted_props}
|
|
440
|
-
persistence_type={persistence_type}
|
|
441
|
-
data-dash-is-loading={
|
|
442
|
-
(loading_state && loading_state.is_loading) || undefined
|
|
443
|
-
}
|
|
444
|
-
getPopupContainer={
|
|
445
|
-
popupContainer === 'parent' ?
|
|
446
|
-
(triggerNode) => triggerNode.parentNode :
|
|
447
|
-
undefined
|
|
448
|
-
}
|
|
449
|
-
/>
|
|
450
|
-
</ConfigProvider>
|
|
451
|
-
</div>
|
|
9
|
+
<Suspense fallback={null}>
|
|
10
|
+
<LazyAntdDateRangePicker {...props} />
|
|
11
|
+
</Suspense>
|
|
452
12
|
);
|
|
453
13
|
}
|
|
454
14
|
|
|
@@ -639,4 +199,7 @@ AntdDateRangePicker.defaultProps = {
|
|
|
639
199
|
batchPropsNames: []
|
|
640
200
|
}
|
|
641
201
|
|
|
642
|
-
export default AntdDateRangePicker;
|
|
202
|
+
export default AntdDateRangePicker;
|
|
203
|
+
|
|
204
|
+
export const propTypes = AntdDateRangePicker.propTypes;
|
|
205
|
+
export const defaultProps = AntdDateRangePicker.defaultProps;
|