@chaoswise/ui 2.3.0 → 2.3.2
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/lib/Button/index.js +0 -8
- package/lib/CWCascader/index.js +56 -1
- package/lib/CWCascader/index.less +22 -0
- package/lib/CWCascader/rc-cascader/Cascader.js +45 -21
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +115 -48
- package/lib/CWCascader/rc-cascader/OptionList/index.js +11 -5
- package/lib/CWCascader/rc-cascader/OptionList/useKeyboard.js +64 -68
- package/lib/CWCascader/rc-cascader/hooks/useDisplayValues.js +45 -16
- package/lib/CWCascader/rc-cascader/hooks/useEntities.js +0 -8
- package/lib/CWCascader/rc-cascader/utils/treeUtil.js +45 -1
- package/lib/CWRangePicker/DropdownMenu/MoreTimeList/index.js +0 -1
- package/lib/CWRangePicker/DropdownMenu/index.js +5 -32
- package/lib/CWRangePicker/DropdownMenu/index.less +11 -7
- package/lib/CWRangePicker/Refresh/index.js +32 -16
- package/lib/CWRangePicker/TimeSpan/index.js +11 -11
- package/lib/CWRangePicker/index.js +105 -64
- package/lib/CWRangePicker/locale/en_US.js +2 -1
- package/lib/CWRangePicker/locale/zh_CN.js +2 -1
- package/lib/CWRangePicker/utils/index.js +10 -4
- package/lib/CWSelect/index.js +4 -4
- package/lib/CWSelect/index.less +1 -1
- package/lib/Cascader/index.less +24 -2
- package/lib/DropdownDatePicker/DropdownMenu/MoreTimeList/index.js +46 -0
- package/lib/DropdownDatePicker/DropdownMenu/MoreTimeList/index.less +14 -0
- package/lib/DropdownDatePicker/DropdownMenu/index.js +126 -0
- package/lib/DropdownDatePicker/DropdownMenu/index.less +68 -0
- package/lib/DropdownDatePicker/assets/Calendar2.js +15 -0
- package/lib/DropdownDatePicker/assets/Recover.js +18 -0
- package/lib/DropdownDatePicker/assets/live.js +19 -0
- package/lib/DropdownDatePicker/assets/more.js +23 -0
- package/lib/DropdownDatePicker/index.js +357 -0
- package/lib/DropdownDatePicker/index.less +34 -0
- package/lib/DropdownDatePicker/locale/en_US.js +21 -0
- package/lib/DropdownDatePicker/locale/index.js +12 -0
- package/lib/DropdownDatePicker/locale/zh_CN.js +21 -0
- package/lib/DropdownDatePicker/utils/index.js +251 -0
- package/lib/InputNumber/index.js +15 -11
- package/lib/ModuleFederation/ErrorBoundary/index.js +54 -0
- package/lib/ModuleFederation/index.js +10 -0
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +185 -0
- package/lib/ModuleFederation/react-dynamic-remote-component/attach-script.js +42 -0
- package/lib/ModuleFederation/react-dynamic-remote-component/index.js +1 -0
- package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +44 -0
- package/lib/ModuleFederation/react-dynamic-remote-component/loading-script.js +35 -0
- package/lib/ModuleFederation/react-dynamic-remote-component/suspend.js +28 -0
- package/lib/ModuleFederation/react-dynamic-remote-component/utils.js +7 -0
- package/lib/QuickTransfer/locale/index.js +1 -4
- package/lib/QuickTransfer/locale/zh_CN.js +0 -8
- package/lib/RangePicker/components/ExtraTimeFooter.js +8 -2
- package/lib/RangePicker/index.js +5 -0
- package/lib/RangePicker/index.less +22 -7
- package/lib/SimplePagination/index.js +1 -1
- package/package.json +3 -2
|
@@ -41,10 +41,10 @@ import Refresh from "./Refresh";
|
|
|
41
41
|
import CalendarSvg from "./assets/Calendar";
|
|
42
42
|
import LiveSvg from "./assets/live";
|
|
43
43
|
import RecoverSvg from "./assets/Recover";
|
|
44
|
-
import { regroupDataSourceFn, echoInputValue, getUnit, judgeType, getChangeUnitDate, isInvalidDate, range, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo, getFinalDateOption, getTruthDateCount, isAfterDate } from "./utils";
|
|
44
|
+
import { regroupDataSourceFn, echoInputValue, getUnit, judgeType, getChangeUnitDate, isInvalidDate, range, funcValueChangeArrayValue, getCorrectValue, getHistoryInfo, getFinalDateOption, getTruthDateCount, isAfterDate, isSameDate } from "./utils";
|
|
45
|
+
import _ from "lodash";
|
|
45
46
|
import moment from "moment";
|
|
46
47
|
import "./index.less";
|
|
47
|
-
// const { RangePicker } = DatePicker;
|
|
48
48
|
var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
49
49
|
var defaultValue = props.defaultValue,
|
|
50
50
|
value = props.value,
|
|
@@ -53,6 +53,8 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
53
53
|
classNameWrapper = props.classNameWrapper,
|
|
54
54
|
_props$onChange = props.onChange,
|
|
55
55
|
_onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
|
56
|
+
_props$onInitChange = props.onInitChange,
|
|
57
|
+
_onInitChange = _props$onInitChange === void 0 ? function () {} : _props$onInitChange,
|
|
56
58
|
_props$growSize = props.growSize,
|
|
57
59
|
growSize = _props$growSize === void 0 ? 3 : _props$growSize,
|
|
58
60
|
_props$tipTooltipOpti = props.tipTooltipOption,
|
|
@@ -68,8 +70,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
68
70
|
inputPrefixIcon = props.inputPrefixIcon,
|
|
69
71
|
_props$format = props.format,
|
|
70
72
|
format = _props$format === void 0 ? "YYYY/MM/DD HH:mm:ss" : _props$format,
|
|
71
|
-
|
|
72
|
-
forceRenderTitle = _props$forceRenderTit === void 0 ? false : _props$forceRenderTit,
|
|
73
|
+
forceRenderTitle = props.forceRenderTitle,
|
|
73
74
|
open = props.open;
|
|
74
75
|
var _ConfigProvider$useLo = _ConfigProvider.useLocale(),
|
|
75
76
|
_ConfigProvider$useLo2 = _ConfigProvider$useLo.locale,
|
|
@@ -81,8 +82,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
81
82
|
onAutoRefreshChange = _refreshOption$onAuto2 === void 0 ? function () {} : _refreshOption$onAuto2,
|
|
82
83
|
_refreshOption$delay = refreshOption.delay,
|
|
83
84
|
delay = _refreshOption$delay === void 0 ? 5000 : _refreshOption$delay,
|
|
84
|
-
|
|
85
|
-
openAutoRefresh = _refreshOption$openAu === void 0 ? true : _refreshOption$openAu;
|
|
85
|
+
openAutoRefresh = refreshOption.openAutoRefresh;
|
|
86
86
|
var _menuOption$showCalen = menuOption.showCalendar,
|
|
87
87
|
showCalendar = _menuOption$showCalen === void 0 ? true : _menuOption$showCalen,
|
|
88
88
|
_menuOption$exceedSho = menuOption.exceedShowInMore,
|
|
@@ -151,6 +151,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
151
151
|
// 定时器计数
|
|
152
152
|
var timeRef = useRef(null);
|
|
153
153
|
var isInputRef = useRef(false); // 标记,输入框非默认值,输入内容
|
|
154
|
+
var isClickAutoRefresh = useRef(false); // 标记 点击自动刷新按钮
|
|
154
155
|
// 输入框处理聚焦失焦
|
|
155
156
|
var inputRef = useRef(null);
|
|
156
157
|
// 含有刷新组件暴露的方法
|
|
@@ -177,11 +178,27 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
177
178
|
var _dateValue = dateValue,
|
|
178
179
|
values = _dateValue.value;
|
|
179
180
|
var _judgeType = judgeType(dateValue),
|
|
180
|
-
_judgeType2 = _slicedToArray(_judgeType,
|
|
181
|
-
isRule = _judgeType2[0]
|
|
181
|
+
_judgeType2 = _slicedToArray(_judgeType, 2),
|
|
182
|
+
isRule = _judgeType2[0],
|
|
183
|
+
captureUnit = _judgeType2[1];
|
|
182
184
|
if (!isRule && !values) {
|
|
183
185
|
setIsAutoRefresh(true);
|
|
184
186
|
}
|
|
187
|
+
var initValue = dateValue;
|
|
188
|
+
if (isRule) {
|
|
189
|
+
initValue = _objectSpread(_objectSpread({}, initValue), {}, {
|
|
190
|
+
isRecently: true,
|
|
191
|
+
value: getChangeUnitDate(captureUnit[0], captureUnit[1]),
|
|
192
|
+
number: captureUnit[0],
|
|
193
|
+
unit: captureUnit[1] === "mo" ? "M" : captureUnit[1]
|
|
194
|
+
});
|
|
195
|
+
} else if (values) {
|
|
196
|
+
initValue = _objectSpread(_objectSpread({}, initValue), {}, {
|
|
197
|
+
isRecently: false,
|
|
198
|
+
value: funcValueChangeArrayValue(values)
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
_onInitChange(initValue);
|
|
185
202
|
setDateValue(dateValue);
|
|
186
203
|
}, []);
|
|
187
204
|
useEffect(function () {
|
|
@@ -191,31 +208,52 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
191
208
|
setRecordDateValue(defaultValue);
|
|
192
209
|
}
|
|
193
210
|
}, [defaultValue, value]);
|
|
211
|
+
var enableAutoRefresh = useMemo(function () {
|
|
212
|
+
return openAutoRefresh !== undefined ? openAutoRefresh : isAutoRefresh;
|
|
213
|
+
}, [openAutoRefresh, isAutoRefresh]);
|
|
194
214
|
// 输入框回显
|
|
195
215
|
useEffect(function () {
|
|
196
|
-
setInputValue(echoInputValue(recordDateValue, isFocus, locale, format, forceRenderTitle,
|
|
197
|
-
}, [recordDateValue, isFocus, locale, format, forceRenderTitle,
|
|
216
|
+
setInputValue(echoInputValue(recordDateValue, isFocus, locale, format, forceRenderTitle, enableAutoRefresh));
|
|
217
|
+
}, [recordDateValue, isFocus, locale, format, forceRenderTitle, enableAutoRefresh]);
|
|
198
218
|
useEffect(function () {
|
|
199
219
|
var _judgeType3 = judgeType(recordDateValue),
|
|
200
220
|
_judgeType4 = _slicedToArray(_judgeType3, 1),
|
|
201
221
|
isRule = _judgeType4[0];
|
|
202
222
|
var isHasDate = !isRule && !recordDateValue.value ? false : true;
|
|
203
223
|
if (isHasDate) {
|
|
204
|
-
|
|
205
|
-
if (
|
|
206
|
-
if (
|
|
224
|
+
if (openAutoRefresh !== undefined) {
|
|
225
|
+
if (!isRule) {
|
|
226
|
+
if (openAutoRefresh) {
|
|
227
|
+
onAutoRefreshChange(false);
|
|
228
|
+
}
|
|
229
|
+
} else {
|
|
230
|
+
if (isRule && isClickAutoRefresh.current) {
|
|
231
|
+
onAutoRefreshChange(true);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
isClickAutoRefresh.current = false;
|
|
235
|
+
} else {
|
|
236
|
+
if (isRule) {
|
|
237
|
+
if (!isAutoRefresh) {
|
|
207
238
|
onAutoRefreshChange(true);
|
|
208
239
|
}
|
|
209
|
-
return true;
|
|
210
240
|
} else {
|
|
211
|
-
if (
|
|
241
|
+
if (isAutoRefresh) {
|
|
212
242
|
onAutoRefreshChange(false);
|
|
213
243
|
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
setIsAutoRefresh(function (pre) {
|
|
247
|
+
if (isRule) {
|
|
248
|
+
return true;
|
|
249
|
+
} else {
|
|
214
250
|
return false;
|
|
215
251
|
}
|
|
216
252
|
});
|
|
253
|
+
} else {
|
|
254
|
+
isClickAutoRefresh.current = false;
|
|
217
255
|
}
|
|
218
|
-
}, [recordDateValue]);
|
|
256
|
+
}, [recordDateValue, isAutoRefresh, openAutoRefresh]);
|
|
219
257
|
useEffect(function () {
|
|
220
258
|
var values = recordDateValue.value;
|
|
221
259
|
var _judgeType5 = judgeType(recordDateValue),
|
|
@@ -223,19 +261,19 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
223
261
|
isRule = _judgeType6[0],
|
|
224
262
|
captureUnit = _judgeType6[1],
|
|
225
263
|
recordUnit = _judgeType6[2];
|
|
226
|
-
if (
|
|
264
|
+
if (enableAutoRefresh && isRule) {
|
|
227
265
|
timeRef.current = setInterval(function () {
|
|
228
266
|
var newValue = _objectSpread(_objectSpread({}, recordDateValue), {}, {
|
|
229
267
|
timeDomain: recordUnit,
|
|
230
268
|
number: captureUnit[0],
|
|
231
|
-
unit: captureUnit[1],
|
|
269
|
+
unit: captureUnit[1] === "mo" ? "M" : captureUnit[1],
|
|
232
270
|
value: getChangeUnitDate(captureUnit[0], captureUnit[1]),
|
|
233
271
|
isRecently: true
|
|
234
272
|
});
|
|
235
273
|
onAutoRefresh(newValue);
|
|
236
274
|
}, delay);
|
|
237
275
|
}
|
|
238
|
-
if (
|
|
276
|
+
if (enableAutoRefresh && !isRule && !values) {
|
|
239
277
|
timeRef.current = setInterval(function () {
|
|
240
278
|
onAutoRefresh(recordDateValue);
|
|
241
279
|
}, delay);
|
|
@@ -243,7 +281,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
243
281
|
return function () {
|
|
244
282
|
clearInterval(timeRef.current);
|
|
245
283
|
};
|
|
246
|
-
}, [
|
|
284
|
+
}, [enableAutoRefresh, recordDateValue, delay]);
|
|
247
285
|
// 点击空白处日历切换
|
|
248
286
|
useEffect(function () {
|
|
249
287
|
document.addEventListener("click", clickBody);
|
|
@@ -252,16 +290,29 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
252
290
|
};
|
|
253
291
|
}, []);
|
|
254
292
|
// 日期是否存在
|
|
255
|
-
var
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
293
|
+
var _useMemo = useMemo(function () {
|
|
294
|
+
// 不符合最近时间格式和没有日期数据返回false
|
|
295
|
+
var values = recordDateValue.value;
|
|
296
|
+
var _judgeType7 = judgeType(recordDateValue),
|
|
297
|
+
_judgeType8 = _slicedToArray(_judgeType7, 2),
|
|
298
|
+
isRule = _judgeType8[0],
|
|
299
|
+
captureUnit = _judgeType8[1];
|
|
300
|
+
values = funcValueChangeArrayValue(values);
|
|
301
|
+
var isHasDate = true;
|
|
302
|
+
var isRightDisabled = false;
|
|
303
|
+
if (isRule) {
|
|
304
|
+
isRightDisabled = true;
|
|
305
|
+
values = getChangeUnitDate(captureUnit[0], captureUnit[1]);
|
|
306
|
+
}
|
|
307
|
+
if (!isRule && !values) {
|
|
308
|
+
isHasDate = false;
|
|
309
|
+
}
|
|
310
|
+
return [isHasDate, values, isRightDisabled];
|
|
311
|
+
}, [recordDateValue]),
|
|
312
|
+
_useMemo2 = _slicedToArray(_useMemo, 3),
|
|
313
|
+
isHasDate = _useMemo2[0],
|
|
314
|
+
_defaultValue = _useMemo2[1],
|
|
315
|
+
isRightDisabled = _useMemo2[2];
|
|
265
316
|
// 重组数据源
|
|
266
317
|
var regroupDataSource = useMemo(function () {
|
|
267
318
|
if (exceedShowInMore) {
|
|
@@ -292,17 +343,6 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
292
343
|
value: funcValueChangeArrayValue(values)
|
|
293
344
|
});
|
|
294
345
|
returnValue = getCorrectValue(returnValue, key);
|
|
295
|
-
var _judgeType9 = judgeType(returnValue),
|
|
296
|
-
_judgeType10 = _slicedToArray(_judgeType9, 1),
|
|
297
|
-
isRule = _judgeType10[0];
|
|
298
|
-
if (!isRule && !returnValue.value) {
|
|
299
|
-
setIsAutoRefresh(function (pre) {
|
|
300
|
-
if (!pre) {
|
|
301
|
-
onAutoRefreshChange(true);
|
|
302
|
-
}
|
|
303
|
-
return true;
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
346
|
_onChange(returnValue);
|
|
307
347
|
if (!value) {
|
|
308
348
|
setRecordDateValue(returnValue);
|
|
@@ -353,9 +393,9 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
353
393
|
e.target.select();
|
|
354
394
|
}, 100);
|
|
355
395
|
};
|
|
356
|
-
//
|
|
357
|
-
var
|
|
358
|
-
|
|
396
|
+
// 输入框按下Enter
|
|
397
|
+
var onPressEnter = function onPressEnter(e) {
|
|
398
|
+
onInputBlur();
|
|
359
399
|
};
|
|
360
400
|
// 外部获取ref停止自动刷新
|
|
361
401
|
var onStop = function onStop() {
|
|
@@ -368,8 +408,8 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
368
408
|
var _refreshRef$current4, _refreshRef$current5;
|
|
369
409
|
((_refreshRef$current4 = refreshRef.current) === null || _refreshRef$current4 === void 0 ? void 0 : _refreshRef$current4.onAutoRefresh) && ((_refreshRef$current5 = refreshRef.current) === null || _refreshRef$current5 === void 0 ? void 0 : _refreshRef$current5.onAutoRefresh());
|
|
370
410
|
};
|
|
371
|
-
//
|
|
372
|
-
var
|
|
411
|
+
// 输入框失去焦点
|
|
412
|
+
var onInputBlur = function onInputBlur(e) {
|
|
373
413
|
if (!isInputRef.current) return;
|
|
374
414
|
var _getUnit = getUnit(inputValue),
|
|
375
415
|
isRule = _getUnit.isRule,
|
|
@@ -381,9 +421,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
381
421
|
}, inputValue);
|
|
382
422
|
var isInvalidDate_ = isInvalidDate(returnValue.value);
|
|
383
423
|
if (!isInvalidDate_) {
|
|
384
|
-
var _inputRef$current;
|
|
385
424
|
// message.success(localeObj["fit-the-input-format"]);
|
|
386
|
-
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.blur();
|
|
387
425
|
_onChange(returnValue);
|
|
388
426
|
setIsFocus(false);
|
|
389
427
|
var _getHistoryInfo = getHistoryInfo(returnValue, historyList, locale, format),
|
|
@@ -406,11 +444,9 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
406
444
|
var _dateValue2 = finalDateOption.dateValue;
|
|
407
445
|
var dateCount = getTruthDateCount(_dateValue2);
|
|
408
446
|
if (dateCount === 2) {
|
|
409
|
-
var _inputRef$current2;
|
|
410
447
|
var _returnValue = getCorrectValue({
|
|
411
448
|
value: _dateValue2
|
|
412
449
|
});
|
|
413
|
-
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur();
|
|
414
450
|
_onChange(_returnValue);
|
|
415
451
|
setIsFocus(false);
|
|
416
452
|
var _getHistoryInfo3 = getHistoryInfo(_returnValue, historyList, locale, format),
|
|
@@ -438,7 +474,8 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
438
474
|
value: value,
|
|
439
475
|
isAutoRefresh: isAutoRefresh,
|
|
440
476
|
setIsAutoRefresh: setIsAutoRefresh,
|
|
441
|
-
refreshOption: refreshOption
|
|
477
|
+
refreshOption: refreshOption,
|
|
478
|
+
enableAutoRefresh: enableAutoRefresh
|
|
442
479
|
};
|
|
443
480
|
var dropdownMenuProps = _objectSpread(_objectSpread({}, commonProps), {}, {
|
|
444
481
|
dataSource: dataSource,
|
|
@@ -462,11 +499,13 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
462
499
|
backTooltipVisible: backTooltipVisible,
|
|
463
500
|
setBackTooltipVisible: setBackTooltipVisible,
|
|
464
501
|
expandTooltipVisible: expandTooltipVisible,
|
|
465
|
-
setExpandTooltipVisible: setExpandTooltipVisible
|
|
502
|
+
setExpandTooltipVisible: setExpandTooltipVisible,
|
|
503
|
+
isRightDisabled: isRightDisabled
|
|
466
504
|
});
|
|
467
505
|
var refreshProps = _objectSpread(_objectSpread({}, commonProps), {}, {
|
|
468
506
|
isHasDate: isHasDate,
|
|
469
|
-
setBackTooltipVisible: setBackTooltipVisible
|
|
507
|
+
setBackTooltipVisible: setBackTooltipVisible,
|
|
508
|
+
isClickAutoRefresh: isClickAutoRefresh
|
|
470
509
|
});
|
|
471
510
|
return /*#__PURE__*/React.createElement("div", {
|
|
472
511
|
className: classnames("cw-range-picker-wrapper", classNameWrapper),
|
|
@@ -493,6 +532,12 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
493
532
|
value: [_value[0], moment()]
|
|
494
533
|
});
|
|
495
534
|
}
|
|
535
|
+
var _values3 = _values2,
|
|
536
|
+
resValue = _values3.value;
|
|
537
|
+
if (isSameDate(resValue[0], resValue[1], "second") || isAfterDate(resValue[0], resValue[1])) {
|
|
538
|
+
_message.error(localeObj["the-selected-time-does-not-meet-the-rule-limit"]);
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
496
541
|
_onChange(_values2);
|
|
497
542
|
var _getHistoryInfo5 = getHistoryInfo(_values2, historyList, locale, format),
|
|
498
543
|
_getHistoryInfo6 = _slicedToArray(_getHistoryInfo5, 2),
|
|
@@ -550,15 +595,8 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
550
595
|
}
|
|
551
596
|
}
|
|
552
597
|
},
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
endTimeOption: moment("23:59:59", "HH:mm:ss")
|
|
556
|
-
},
|
|
557
|
-
defaultValue: [moment().subtract(1, "months").startOf("month"), moment().subtract(1, "months").startOf("month").add(1, "d").set({
|
|
558
|
-
"hour": 23,
|
|
559
|
-
"minute": 59,
|
|
560
|
-
"second": 59
|
|
561
|
-
})],
|
|
598
|
+
defaultValue: _defaultValue // 默认为当前已经选择的时间
|
|
599
|
+
,
|
|
562
600
|
showTime: {
|
|
563
601
|
hideDisabledOptions: true
|
|
564
602
|
}
|
|
@@ -595,8 +633,7 @@ var CWRangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
595
633
|
CWRangePicker.defaultProps = {
|
|
596
634
|
moreItemDropdownPosition: "left",
|
|
597
635
|
growSize: 3,
|
|
598
|
-
format: "YYYY/MM/DD HH:mm:ss"
|
|
599
|
-
forceRenderTitle: false
|
|
636
|
+
format: "YYYY/MM/DD HH:mm:ss"
|
|
600
637
|
};
|
|
601
638
|
CWRangePicker.propTypes = {
|
|
602
639
|
/**
|
|
@@ -619,6 +656,10 @@ CWRangePicker.propTypes = {
|
|
|
619
656
|
* 时间变化的回调onChange({value,isRecently?timeDomain?number?unit?})
|
|
620
657
|
*/
|
|
621
658
|
onChange: PropTypes.func,
|
|
659
|
+
/**
|
|
660
|
+
* 初始时间数据进入时间返回的回调(*主要针对于最近时间)
|
|
661
|
+
*/
|
|
662
|
+
onInitChange: PropTypes.func,
|
|
622
663
|
/**
|
|
623
664
|
* 时间跨度的比例,>=2,默认为3
|
|
624
665
|
*/
|
|
@@ -30,5 +30,6 @@ export default {
|
|
|
30
30
|
clear: 'Clear',
|
|
31
31
|
"enter manually": "You can manually enter a query statement in the following format",
|
|
32
32
|
"fit-the-input-format": "Fit the input format",
|
|
33
|
-
"does-not-match-the-input-format": "Does not match the input format"
|
|
33
|
+
"does-not-match-the-input-format": "Does not match the input format",
|
|
34
|
+
"the-selected-time-does-not-meet-the-rule-limit": "If the selected time is the same or exceeds the current time, select another time"
|
|
34
35
|
};
|
|
@@ -30,5 +30,6 @@ export default {
|
|
|
30
30
|
clear: '清空',
|
|
31
31
|
"enter manually": "可根据以下类型,按查询语句格式手动输入",
|
|
32
32
|
"fit-the-input-format": "符合输入格式",
|
|
33
|
-
"does-not-match-the-input-format": "不符合输入格式,请重新输入"
|
|
33
|
+
"does-not-match-the-input-format": "不符合输入格式,请重新输入",
|
|
34
|
+
"the-selected-time-does-not-meet-the-rule-limit": "选择的时间二者相同或者某一时间超过当前时间,请重新选择"
|
|
34
35
|
};
|
|
@@ -170,6 +170,12 @@ export var echoInputValue = function echoInputValue() {
|
|
|
170
170
|
}
|
|
171
171
|
} else {
|
|
172
172
|
var _value3;
|
|
173
|
+
if (isRule) {
|
|
174
|
+
if (isFoucs) {
|
|
175
|
+
return recordUnit;
|
|
176
|
+
}
|
|
177
|
+
return echoRecentlyTimeTitle(locale, captureUnit);
|
|
178
|
+
}
|
|
173
179
|
if (Array.isArray(value) && (_value3 = value) !== null && _value3 !== void 0 && _value3.length) {
|
|
174
180
|
return echoAbsoluteTimeTitle(value, format);
|
|
175
181
|
}
|
|
@@ -225,7 +231,7 @@ export var getTimeSpanFromValue = function getTimeSpanFromValue(value) {
|
|
|
225
231
|
value: value,
|
|
226
232
|
timeDomain: timeDomain,
|
|
227
233
|
number: captureUnit[0],
|
|
228
|
-
unit: captureUnit[1]
|
|
234
|
+
unit: captureUnit[1] === "mo" ? "M" : captureUnit[1]
|
|
229
235
|
};
|
|
230
236
|
};
|
|
231
237
|
|
|
@@ -379,7 +385,7 @@ export var getCorrectValue = function getCorrectValue(value) {
|
|
|
379
385
|
returnValue = _objectSpread(_objectSpread({}, returnValue), {}, {
|
|
380
386
|
timeDomain: key,
|
|
381
387
|
number: captureUnit[0],
|
|
382
|
-
unit: captureUnit[1],
|
|
388
|
+
unit: captureUnit[1] === "mo" ? "M" : captureUnit[1],
|
|
383
389
|
isRecently: true
|
|
384
390
|
});
|
|
385
391
|
if (!returnValue.value) {
|
|
@@ -448,8 +454,8 @@ export var isAfterDate = function isAfterDate(currentDate, compareDate) {
|
|
|
448
454
|
return currentDate.isAfter(compareDate);
|
|
449
455
|
};
|
|
450
456
|
// 检查一个 moment 是否与另一个 moment 相同
|
|
451
|
-
export var isSameDate = function isSameDate(currentDate, compareDate) {
|
|
452
|
-
return currentDate.isSame(compareDate);
|
|
457
|
+
export var isSameDate = function isSameDate(currentDate, compareDate, unit) {
|
|
458
|
+
return unit ? currentDate.isSame(compareDate, unit) : currentDate.isSame(compareDate);
|
|
453
459
|
};
|
|
454
460
|
var isAfterCurrentDate = function isAfterCurrentDate(cloneStartDate, cloneEndDate) {
|
|
455
461
|
var flag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
package/lib/CWSelect/index.js
CHANGED
|
@@ -149,16 +149,16 @@ var CWSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
149
149
|
useEffect(function () {
|
|
150
150
|
if (mode) {
|
|
151
151
|
getMapFromArray(defaultValue);
|
|
152
|
-
if (defaultValue && mode == "multiple") {
|
|
153
|
-
setActiveKey(defaultValue);
|
|
152
|
+
if ("defaultValue" in props && mode == "multiple") {
|
|
153
|
+
setActiveKey(defaultValue || []);
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
}, [defaultValue]);
|
|
157
157
|
useEffect(function () {
|
|
158
158
|
if (mode) {
|
|
159
159
|
getMapFromArray(value);
|
|
160
|
-
if (value && mode == "multiple") {
|
|
161
|
-
setActiveKey(value);
|
|
160
|
+
if ("value" in props && mode == "multiple") {
|
|
161
|
+
setActiveKey(value || []);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
}, [value]);
|
package/lib/CWSelect/index.less
CHANGED
|
@@ -661,7 +661,7 @@
|
|
|
661
661
|
font-weight: @select-item-selected-font-weight; // UI规范
|
|
662
662
|
background-color: @select-selected-enable-bg; // UI规范
|
|
663
663
|
}
|
|
664
|
-
&.cw-select-dropdown-multiple{
|
|
664
|
+
&.cw-select-dropdown-multiple.cw-select-dropdown-has-checkbox{
|
|
665
665
|
.@{select-prefix-cls}-item-option.@{select-prefix-cls}-item-option-selected:not(.@{select-prefix-cls}-item-option-disabled){
|
|
666
666
|
color: @text-color; // UI规范
|
|
667
667
|
font-weight: 400; // UI规范
|
package/lib/Cascader/index.less
CHANGED
|
@@ -2,9 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
.@{cascader-prefix-cls}-menus {
|
|
4
4
|
position: static !important;
|
|
5
|
+
|
|
6
|
+
.@{cascader-prefix-cls}-menu {
|
|
7
|
+
.@{cascader-prefix-cls}-menu-item {
|
|
8
|
+
|
|
9
|
+
.@{cascader-prefix-cls}-menu-item-expand-icon,
|
|
10
|
+
.@{cascader-prefix-cls}-menu-item-loading-icon {
|
|
11
|
+
position: static;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
5
15
|
}
|
|
6
|
-
|
|
7
|
-
|
|
16
|
+
|
|
17
|
+
.@{cascader-prefix-cls}.@{ant-prefix}-select {
|
|
18
|
+
.@{ant-prefix}-select-selection-overflow {
|
|
8
19
|
flex: 0 1 auto;
|
|
20
|
+
|
|
21
|
+
.@{ant-prefix}-select-selection-overflow-item {
|
|
22
|
+
|
|
23
|
+
.@{ant-prefix}-select-selection-search {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
9
27
|
}
|
|
28
|
+
}
|
|
29
|
+
// antd4 :点击空白处浮层不消失问题
|
|
30
|
+
.@{cascader-prefix-cls}-dropdown.@{ant-prefix}-select-dropdown.@{ant-prefix}-slide-up-leave{
|
|
31
|
+
display: none !important;
|
|
10
32
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _Row from "@chaoswise/ui/lib/Antd/Row";
|
|
2
|
+
import _Col from "@chaoswise/ui/lib/Antd/Col";
|
|
3
|
+
import "@chaoswise/ui/lib/TooltipText/index.less";
|
|
4
|
+
import _TooltipText from "@chaoswise/ui/lib/TooltipText";
|
|
5
|
+
import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import classnames from "classnames";
|
|
8
|
+
import { getLocale } from "../../locale";
|
|
9
|
+
import _ from "lodash";
|
|
10
|
+
import "./index.less";
|
|
11
|
+
var MoreTimeList = function MoreTimeList(props) {
|
|
12
|
+
var regroupDataSource = props.regroupDataSource,
|
|
13
|
+
recordDateValue = props.recordDateValue,
|
|
14
|
+
onClickItem = props.onClickItem;
|
|
15
|
+
var _ConfigProvider$useLo = _ConfigProvider.useLocale(),
|
|
16
|
+
_ConfigProvider$useLo2 = _ConfigProvider$useLo.locale,
|
|
17
|
+
locale = _ConfigProvider$useLo2 === void 0 ? "zh" : _ConfigProvider$useLo2;
|
|
18
|
+
var localeObj = getLocale(locale);
|
|
19
|
+
// 点击Menu.Item中切换常规模式
|
|
20
|
+
var onClickMoreItem = function onClickMoreItem(item) {
|
|
21
|
+
onClickItem(item);
|
|
22
|
+
};
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: classnames("cw-dropdown-date-picker-popup-more-content")
|
|
25
|
+
}, regroupDataSource.map(function (timeTypeItem, index) {
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
style: {
|
|
28
|
+
padding: "8px 0",
|
|
29
|
+
borderBottom: regroupDataSource.length - 1 !== index ? "1px solid rgba(0,0,0,0.06)" : ""
|
|
30
|
+
},
|
|
31
|
+
key: timeTypeItem.type
|
|
32
|
+
}, /*#__PURE__*/React.createElement("h3", null, localeObj[timeTypeItem.type]), /*#__PURE__*/React.createElement(_Row, null, timeTypeItem.timeList.map(function (item) {
|
|
33
|
+
return /*#__PURE__*/React.createElement(_Col, {
|
|
34
|
+
key: item.key,
|
|
35
|
+
span: timeTypeItem.type === "absolute" || timeTypeItem.type == "unixTimestamp" ? 12 : 8,
|
|
36
|
+
className: classnames("more-col-item", {
|
|
37
|
+
"cw-dropdown-date-picker-dropdown-menu-item-selected": (recordDateValue === null || recordDateValue === void 0 ? void 0 : recordDateValue.key) === item.key
|
|
38
|
+
}),
|
|
39
|
+
onClick: function onClick() {
|
|
40
|
+
return onClickMoreItem(item);
|
|
41
|
+
}
|
|
42
|
+
}, /*#__PURE__*/React.createElement(_TooltipText, null, item.render ? item.render(item) : item.title));
|
|
43
|
+
})));
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
export default MoreTimeList;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.cw-dropdown-date-picker-popup-more-content {
|
|
2
|
+
padding: 12px 16px 8px;
|
|
3
|
+
background-color: @component-background;
|
|
4
|
+
.more-col-item{
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
color:@text-color-show;
|
|
7
|
+
&.cw-dropdown-date-picker-dropdown-menu-item-selected{
|
|
8
|
+
background: @select-selected-enable-bg;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
.more-col-item:hover {
|
|
12
|
+
color: @primary-5;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
import _Dropdown from "@chaoswise/ui/lib/Antd/Dropdown";
|
|
3
|
+
import _Icon from "@chaoswise/ui/lib/Antd/Icon";
|
|
4
|
+
import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
|
|
5
|
+
var _excluded = ["timeDomain", "number", "unit", "value", "isRecently"];
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
|
+
import React from "react";
|
|
14
|
+
import classnames from "classnames";
|
|
15
|
+
import { getLocale } from "../locale";
|
|
16
|
+
import Calendar2Svg from "../assets/Calendar2";
|
|
17
|
+
import LiveSvg from "../assets/live";
|
|
18
|
+
import MoreSvg from "../assets/more";
|
|
19
|
+
import MoreTimeList from "./MoreTimeList";
|
|
20
|
+
import { funcValueChangeArrayValue, getCorrectValue } from "../utils";
|
|
21
|
+
import _ from "lodash";
|
|
22
|
+
import "./index.less";
|
|
23
|
+
var DropdownMenu = function DropdownMenu(props) {
|
|
24
|
+
var dataSource = props.dataSource,
|
|
25
|
+
regroupDataSource = props.regroupDataSource,
|
|
26
|
+
setIsCalendar = props.setIsCalendar,
|
|
27
|
+
recordDateValue = props.recordDateValue,
|
|
28
|
+
setRecordDateValue = props.setRecordDateValue,
|
|
29
|
+
_value = props.value,
|
|
30
|
+
onChange = props.onChange,
|
|
31
|
+
menuOption = props.menuOption,
|
|
32
|
+
setIsFocus = props.setIsFocus;
|
|
33
|
+
var _ConfigProvider$useLo = _ConfigProvider.useLocale(),
|
|
34
|
+
_ConfigProvider$useLo2 = _ConfigProvider$useLo.locale,
|
|
35
|
+
locale = _ConfigProvider$useLo2 === void 0 ? "zh" : _ConfigProvider$useLo2;
|
|
36
|
+
var localeObj = getLocale(locale);
|
|
37
|
+
var _menuOption$showCalen = menuOption.showCalendar,
|
|
38
|
+
showCalendar = _menuOption$showCalen === void 0 ? true : _menuOption$showCalen,
|
|
39
|
+
_menuOption$showDefau = menuOption.showDefaultCount,
|
|
40
|
+
showDefaultCount = _menuOption$showDefau === void 0 ? 8 : _menuOption$showDefau,
|
|
41
|
+
_menuOption$moreItemD = menuOption.moreItemDropdownPosition,
|
|
42
|
+
moreItemDropdownPosition = _menuOption$moreItemD === void 0 ? "left" : _menuOption$moreItemD;
|
|
43
|
+
// 点击Menu.Item中切换选项列表
|
|
44
|
+
var onClickItem = function onClickItem(item) {
|
|
45
|
+
var timeDomain = recordDateValue.timeDomain,
|
|
46
|
+
number = recordDateValue.number,
|
|
47
|
+
unit = recordDateValue.unit,
|
|
48
|
+
value = recordDateValue.value,
|
|
49
|
+
isRecently = recordDateValue.isRecently,
|
|
50
|
+
rest = _objectWithoutProperties(recordDateValue, _excluded);
|
|
51
|
+
setIsFocus(false);
|
|
52
|
+
var values = item.value;
|
|
53
|
+
if (item.key !== recordDateValue.key) {
|
|
54
|
+
var returnValue = _objectSpread(_objectSpread({}, item), {}, {
|
|
55
|
+
value: funcValueChangeArrayValue(values)
|
|
56
|
+
});
|
|
57
|
+
returnValue = getCorrectValue(returnValue, item.key);
|
|
58
|
+
onChange(returnValue);
|
|
59
|
+
if (!_value) {
|
|
60
|
+
setRecordDateValue(returnValue);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
// 点击切换为日历
|
|
65
|
+
var onClickSelectCalendar = function onClickSelectCalendar(e) {
|
|
66
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
67
|
+
setIsCalendar(true);
|
|
68
|
+
};
|
|
69
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
className: classnames("cw-dropdown-date-picker-dropdown-menu-wrapper")
|
|
71
|
+
}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.slice(0, showDefaultCount).map(function (item) {
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: classnames("cw-dropdown-date-picker-dropdown-menu-_item", {
|
|
74
|
+
"cw-dropdown-date-picker-dropdown-menu-item-selected": (recordDateValue === null || recordDateValue === void 0 ? void 0 : recordDateValue.key) === item.key
|
|
75
|
+
}),
|
|
76
|
+
key: item.key,
|
|
77
|
+
onClick: function onClick() {
|
|
78
|
+
return onClickItem(item);
|
|
79
|
+
}
|
|
80
|
+
}, item.icon ? item.icon : /*#__PURE__*/React.createElement(LiveSvg, null), /*#__PURE__*/React.createElement("span", {
|
|
81
|
+
style: {
|
|
82
|
+
marginLeft: "4px"
|
|
83
|
+
}
|
|
84
|
+
}, item.render ? item.render(item) : item.title));
|
|
85
|
+
}), (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > showDefaultCount && /*#__PURE__*/React.createElement(_Dropdown, {
|
|
86
|
+
overlay: /*#__PURE__*/React.createElement(MoreTimeList, {
|
|
87
|
+
regroupDataSource: regroupDataSource,
|
|
88
|
+
recordDateValue: recordDateValue,
|
|
89
|
+
onClickItem: onClickItem
|
|
90
|
+
}),
|
|
91
|
+
overlayClassName: classnames("cw-dropdown-date-picker-dropdown-menu-more-wrapper", {
|
|
92
|
+
"cw-dropdown-date-picker-dropdown-menu-more-wrapper-left": moreItemDropdownPosition === "left"
|
|
93
|
+
}),
|
|
94
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
95
|
+
return triggerNode;
|
|
96
|
+
}
|
|
97
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
98
|
+
className: classnames("cw-dropdown-date-picker-dropdown-menu-_item", "cw-dropdown-date-picker-dropdown-menu-item-more")
|
|
99
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
style: {
|
|
101
|
+
display: "flex",
|
|
102
|
+
alignItems: "center"
|
|
103
|
+
}
|
|
104
|
+
}, /*#__PURE__*/React.createElement(MoreSvg, {
|
|
105
|
+
className: "cw-range-picker-prefix-icon"
|
|
106
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
107
|
+
style: {
|
|
108
|
+
marginLeft: "4px"
|
|
109
|
+
}
|
|
110
|
+
}, localeObj.more)), /*#__PURE__*/React.createElement(_Icon, {
|
|
111
|
+
type: "right"
|
|
112
|
+
}))), showCalendar && /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
className: classnames("cw-dropdown-date-picker-dropdown-menu-_item"),
|
|
114
|
+
key: "unique-calendar",
|
|
115
|
+
onClick: onClickSelectCalendar
|
|
116
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
className: "cw-range-picker-menu-item-calendar"
|
|
118
|
+
}, /*#__PURE__*/React.createElement(Calendar2Svg, {
|
|
119
|
+
className: "cw-range-picker-prefix-icon"
|
|
120
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
121
|
+
style: {
|
|
122
|
+
marginLeft: "4px"
|
|
123
|
+
}
|
|
124
|
+
}, localeObj["select-calendar"])));
|
|
125
|
+
};
|
|
126
|
+
export default DropdownMenu;
|