@noah-libjs/components 0.0.6 → 0.0.8
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/ArrayInput/components.d.ts +787 -4
- package/dist/LazyAntd/ColorPicker/index.d.ts +1 -1
- package/dist/LazyAntd/DatePicker/Base/DatePicker.d.ts +3 -1
- package/dist/LazyAntd/DatePicker/Base/index.d.ts +6 -2
- package/dist/LazyAntd/DatePicker/RangePicker.d.ts +3 -1
- package/dist/LazyAntd/Tree/Inner.d.ts +2 -1
- package/dist/LazyAntd/Tree/index.d.ts +3 -2
- package/dist/MyAutoComplete/types.d.ts +4 -1
- package/dist/MyButton/index.d.ts +10 -0
- package/dist/MyCheckbox/components.d.ts +807 -24
- package/dist/MyCheckbox/types.d.ts +3 -1
- package/dist/MyDatePicker/Display.d.ts +1 -1
- package/dist/MyIconSelect/index.d.ts +7 -0
- package/dist/MyIconSelect/types.d.ts +16 -0
- package/dist/MyInput/index.d.ts +1 -1
- package/dist/MyRangeDate/Inner.d.ts +3 -5
- package/dist/MyRangeDate/index.d.ts +6 -7
- package/dist/MyRangeDate/utils.d.ts +32 -30
- package/dist/MySelect/components.d.ts +787 -4
- package/dist/MySelect/types.d.ts +1 -1
- package/dist/MySwitch/types.d.ts +5 -2
- package/dist/a_chunks/index.js +561 -91
- package/dist/a_chunks/index.module.js +1 -24
- package/dist/a_chunks/root.17.js +2 -2
- package/dist/a_chunks/root.18.js +5 -5
- package/dist/a_chunks/root.19.js +2 -1
- package/dist/a_chunks/root.20.js +2 -1
- package/dist/a_chunks/root.21.js +2 -1
- package/dist/a_chunks/root.22.js +54 -196
- package/dist/a_chunks/root.23.js +198 -95
- package/dist/a_chunks/root.24.js +118 -5
- package/dist/a_chunks/root.25.js +4 -3
- package/dist/a_chunks/root.26.js +4 -0
- package/dist/a_chunks/root.8.js +7 -5
- package/dist/index.js +2 -1
- package/dist/packs.d.ts +788 -0
- package/dist/util-types/fd/InputType.d.ts +1 -1
- package/dist/util-types/fd/index.d.ts +33 -10
- package/dist/utils/getInputStyle.d.ts +3 -2
- package/dist/utils/msmc.d.ts +8 -2
- package/dist/utils/new.d.ts +12 -0
- package/package.json +4 -4
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (ref === void 0) ref = {};
|
|
3
|
-
var insertAt = ref.insertAt;
|
|
4
|
-
if (!css || typeof document === 'undefined') {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
|
-
var style = document.createElement('style');
|
|
9
|
-
style.type = 'text/css';
|
|
10
|
-
if (insertAt === 'top') {
|
|
11
|
-
if (head.firstChild) {
|
|
12
|
-
head.insertBefore(style, head.firstChild);
|
|
13
|
-
} else {
|
|
14
|
-
head.appendChild(style);
|
|
15
|
-
}
|
|
16
|
-
} else {
|
|
17
|
-
head.appendChild(style);
|
|
18
|
-
}
|
|
19
|
-
if (style.styleSheet) {
|
|
20
|
-
style.styleSheet.cssText = css;
|
|
21
|
-
} else {
|
|
22
|
-
style.appendChild(document.createTextNode(css));
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
import { s as styleInject } from './index.js';
|
|
25
2
|
var css_248z = ".index-module_wrapper__8xmrk input {\n padding: 0 !important;\n border-top: none !important;\n border-left: none !important;\n border-right: none !important;\n}\n.index-module_wrapper__8xmrk .ant-select-selector {\n padding: 0 !important;\n border-top: none !important;\n border-left: none !important;\n border-right: none !important;\n}\n.index-module_wrapper__8xmrk .ant-select-selection-search-input {\n padding: 0 !important;\n border-top: none !important;\n border-left: none !important;\n border-right: none !important;\n}\n.index-module_block-box__zbZ8F {\n display: block !important;\n}\n.index-module_block-box__zbZ8F > div {\n margin-bottom: 6px;\n}\n.index-module_flex-box__aGmld {\n display: flex;\n}\n.index-module_warning__Z3oMd .ant-checkbox-checked .ant-checkbox-inner {\n background: red !important;\n border-color: red !important;\n}\n.index-module_warning__Z3oMd .ant-input {\n color: red !important;\n border-color: red !important;\n border-radius: 0 !important;\n}\n.index-module_warning__Z3oMd .ant-select-selector {\n color: red !important;\n border-color: red !important;\n border-radius: 0 !important;\n}\n.index-module_warning__Z3oMd .ant-select-selection-search-input {\n border-color: red !important;\n border-radius: 0 !important;\n}\n";
|
|
26
3
|
var styles = {
|
|
27
4
|
"wrapper": "index-module_wrapper__8xmrk",
|
package/dist/a_chunks/root.17.js
CHANGED
|
@@ -12,6 +12,7 @@ import '@ant-design/icons';
|
|
|
12
12
|
import 'dayjs';
|
|
13
13
|
import 'rc-select';
|
|
14
14
|
import 'rc-tree';
|
|
15
|
+
import '@noah-libjs/request';
|
|
15
16
|
var componentMap = packs;
|
|
16
17
|
function RenderComponent(p) {
|
|
17
18
|
var _target$props;
|
|
@@ -54,7 +55,7 @@ var MySelect = function MySelect(props) {
|
|
|
54
55
|
fetch_options = props.fetch_options,
|
|
55
56
|
uniqueKey = props.uniqueKey,
|
|
56
57
|
_props$popupMatchSele = props.popupMatchSelectWidth,
|
|
57
|
-
popupMatchSelectWidth = _props$popupMatchSele === void 0 ?
|
|
58
|
+
popupMatchSelectWidth = _props$popupMatchSele === void 0 ? 140 : _props$popupMatchSele,
|
|
58
59
|
others = _objectWithoutProperties(props, _excluded);
|
|
59
60
|
var _use_options = use_options(props),
|
|
60
61
|
options = _use_options.options,
|
|
@@ -139,7 +140,6 @@ var MySelect = function MySelect(props) {
|
|
|
139
140
|
// 多选不支持 非 marshal 不支持
|
|
140
141
|
var isR = !is_multiple && marshal && target;
|
|
141
142
|
var select_node = loading ? /*#__PURE__*/React__default.createElement("span", null, "'\u6570\u636E\u52A0\u8F7D\u4E2D...'") : /*#__PURE__*/React__default.createElement(Select_L, _objectSpread(_objectSpread({
|
|
142
|
-
title: JSON.stringify(options),
|
|
143
143
|
loading: loading,
|
|
144
144
|
className: _warning ? styles['warning'] : undefined,
|
|
145
145
|
style: _style,
|
package/dist/a_chunks/root.18.js
CHANGED
|
@@ -12,6 +12,7 @@ import 'antd';
|
|
|
12
12
|
import 'dayjs';
|
|
13
13
|
import 'rc-select';
|
|
14
14
|
import 'rc-tree';
|
|
15
|
+
import '@noah-libjs/request';
|
|
15
16
|
var components = packs;
|
|
16
17
|
var MyCheckbox = function MyCheckbox(props) {
|
|
17
18
|
var _props$type = props.type,
|
|
@@ -22,7 +23,7 @@ var MyCheckbox = function MyCheckbox(props) {
|
|
|
22
23
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
23
24
|
_onBlur = props.onBlur,
|
|
24
25
|
_props$inputWidth = props.inputWidth,
|
|
25
|
-
inputWidth = _props$inputWidth === void 0 ?
|
|
26
|
+
inputWidth = _props$inputWidth === void 0 ? 50 : _props$inputWidth,
|
|
26
27
|
_props$vertical = props.vertical,
|
|
27
28
|
vertical = _props$vertical === void 0 ? false : _props$vertical,
|
|
28
29
|
_props$style = props.style,
|
|
@@ -108,18 +109,18 @@ var MyCheckbox = function MyCheckbox(props) {
|
|
|
108
109
|
return d.value === option.value;
|
|
109
110
|
});
|
|
110
111
|
if (!targetData || !inputType) return null;
|
|
111
|
-
var C = components[inputType];
|
|
112
|
+
var C = components === null || components === void 0 ? void 0 : components[inputType];
|
|
112
113
|
var inputValue = targetData.text;
|
|
113
114
|
var props = (_option$props = option.props) !== null && _option$props !== void 0 ? _option$props : {};
|
|
114
115
|
var style = (_props$style2 = props.style) !== null && _props$style2 !== void 0 ? _props$style2 : {};
|
|
115
116
|
if (['MyInput', 'Input', 'input', 'MA', 'MyAutoComplete'].includes(inputType)) {
|
|
116
117
|
style = _objectSpread({
|
|
117
|
-
width: inputWidth * (longOptions ? 1 :
|
|
118
|
+
width: inputWidth * (longOptions ? 1 : 1.5)
|
|
118
119
|
}, style);
|
|
119
120
|
}
|
|
120
121
|
if (['Select', 'MS', 'MySelect'].includes(inputType)) {
|
|
121
122
|
style = _objectSpread({
|
|
122
|
-
minWidth: inputWidth * (longOptions ? 1 :
|
|
123
|
+
minWidth: inputWidth * (longOptions ? 1 : 1.5)
|
|
123
124
|
}, style);
|
|
124
125
|
}
|
|
125
126
|
return C ? /*#__PURE__*/React__default.createElement(C, _objectSpread(_objectSpread({
|
|
@@ -202,7 +203,6 @@ var MyCheckbox = function MyCheckbox(props) {
|
|
|
202
203
|
}
|
|
203
204
|
}, ")") : null);
|
|
204
205
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
205
|
-
title: JSON.stringify(options),
|
|
206
206
|
key: index,
|
|
207
207
|
style: {
|
|
208
208
|
display: 'flex',
|
package/dist/a_chunks/root.19.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import '@noah-libjs/utils';
|
|
2
1
|
import { u as use_options } from './index.js';
|
|
2
|
+
import '@noah-libjs/utils';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@ant-design/icons';
|
|
5
5
|
import 'antd';
|
|
6
6
|
import 'dayjs';
|
|
7
7
|
import 'rc-select';
|
|
8
8
|
import 'rc-tree';
|
|
9
|
+
import '@noah-libjs/request';
|
|
9
10
|
var MyCheckbox_DisplayFC = function MyCheckbox_DisplayFC(props) {
|
|
10
11
|
var _use_options = use_options(props),
|
|
11
12
|
options = _use_options.options,
|
package/dist/a_chunks/root.20.js
CHANGED
|
@@ -3,13 +3,14 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React__default, { useRef, useEffect } from 'react';
|
|
5
5
|
import { c as componentMap } from './components.js';
|
|
6
|
-
import '@noah-libjs/utils';
|
|
7
6
|
import { u as use_options } from './index.js';
|
|
7
|
+
import '@noah-libjs/utils';
|
|
8
8
|
import '@ant-design/icons';
|
|
9
9
|
import 'antd';
|
|
10
10
|
import 'dayjs';
|
|
11
11
|
import 'rc-select';
|
|
12
12
|
import 'rc-tree';
|
|
13
|
+
import '@noah-libjs/request';
|
|
13
14
|
function ArrayInputInner(props) {
|
|
14
15
|
var value = props.value,
|
|
15
16
|
onChange = props.onChange,
|
package/dist/a_chunks/root.21.js
CHANGED
|
@@ -3,13 +3,14 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React__default, { useEffect } from 'react';
|
|
5
5
|
import { c as componentMap } from './components.js';
|
|
6
|
-
import '@noah-libjs/utils';
|
|
7
6
|
import { u as use_options } from './index.js';
|
|
7
|
+
import '@noah-libjs/utils';
|
|
8
8
|
import '@ant-design/icons';
|
|
9
9
|
import 'antd';
|
|
10
10
|
import 'dayjs';
|
|
11
11
|
import 'rc-select';
|
|
12
12
|
import 'rc-tree';
|
|
13
|
+
import '@noah-libjs/request';
|
|
13
14
|
var DisplayFC = function DisplayFC(props) {
|
|
14
15
|
var value = props.value,
|
|
15
16
|
_props$separator = props.separator,
|
package/dist/a_chunks/root.22.js
CHANGED
|
@@ -1,208 +1,66 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import
|
|
5
|
-
var _excluded = ["
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["value", "onChange", "marshal", "minDate", "maxDate", "validDate", "getPopupContainer", "showUnknown", "format", "style"];
|
|
6
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import '
|
|
6
|
+
import dayjs from 'dayjs';
|
|
7
|
+
import React__default, { memo, useCallback } from 'react';
|
|
8
|
+
import { e as areEqual, f as format_range_props, g as getInputStyle, R as RangePicker_L, h as handleChangeValue } from './index.js';
|
|
9
|
+
import '@noah-libjs/utils';
|
|
10
|
+
import '@noah-libjs/request';
|
|
11
|
+
import '@ant-design/icons';
|
|
12
|
+
import 'antd';
|
|
15
13
|
import 'rc-select';
|
|
16
14
|
import 'rc-tree';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
var optionKey = props.optionKey,
|
|
22
|
-
_props$options = props.options,
|
|
23
|
-
options = _props$options === void 0 ? defaultOptions : _props$options,
|
|
24
|
-
searchKey = props.searchKey,
|
|
25
|
-
value = props.value,
|
|
26
|
-
memorable = props.memorable,
|
|
27
|
-
memorieskey = props.memorieskey,
|
|
28
|
-
memoriesname = props.memoriesname,
|
|
29
|
-
_props$formName = props.formName,
|
|
30
|
-
formName = _props$formName === void 0 ? 'unsetFormName' : _props$formName,
|
|
31
|
-
name = props.name,
|
|
32
|
-
uniqueKey = props.uniqueKey,
|
|
15
|
+
function MyRangePickerInner(_props) {
|
|
16
|
+
var props = format_range_props(_props);
|
|
17
|
+
var _props$value = props.value,
|
|
18
|
+
value = _props$value === void 0 ? undefined : _props$value,
|
|
33
19
|
onChange = props.onChange,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
// setInit_value(value)
|
|
54
|
-
// }
|
|
55
|
-
setInit_value(value);
|
|
56
|
-
return function () {};
|
|
57
|
-
}, [value]);
|
|
58
|
-
function safeOnChange(str) {
|
|
59
|
-
setInit_value(str);
|
|
60
|
-
onChange === null || onChange === void 0 || onChange(str);
|
|
61
|
-
}
|
|
62
|
-
function init() {
|
|
63
|
-
isFunction(options) ? options() : options;
|
|
64
|
-
optionKey ? getPresetOptions(optionKey) : null;
|
|
65
|
-
var searchValue = searchKey ? getSearchParamsValue(searchKey) : null;
|
|
66
|
-
parse_MC_dict_options(_objectSpread(_objectSpread({}, props), {}, {
|
|
67
|
-
useString: true
|
|
68
|
-
}));
|
|
69
|
-
var _options = parse_MC_option(_objectSpread(_objectSpread({}, props), {}, {
|
|
70
|
-
useString: true
|
|
71
|
-
}));
|
|
72
|
-
if (searchValue) {
|
|
73
|
-
_options.push({
|
|
74
|
-
value: searchValue,
|
|
75
|
-
label: searchValue
|
|
76
|
-
});
|
|
20
|
+
marshal = props.marshal,
|
|
21
|
+
minDate = props.minDate,
|
|
22
|
+
maxDate = props.maxDate,
|
|
23
|
+
validDate = props.validDate,
|
|
24
|
+
getPopupContainer = props.getPopupContainer,
|
|
25
|
+
showUnknown = props.showUnknown,
|
|
26
|
+
format = props.format,
|
|
27
|
+
style = props.style,
|
|
28
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
29
|
+
var _style = getInputStyle(props);
|
|
30
|
+
var handleChange = function handleChange(date, dateString) {
|
|
31
|
+
date = date !== null && date !== void 0 ? date : [];
|
|
32
|
+
var _value = handleChangeValue(props, date);
|
|
33
|
+
onChange === null || onChange === void 0 || onChange(_value);
|
|
34
|
+
};
|
|
35
|
+
var disabledDate = useCallback(function (current) {
|
|
36
|
+
var dateStr = dayjs(current).format(format);
|
|
37
|
+
if (validDate) {
|
|
38
|
+
return dateStr.includes(validDate);
|
|
77
39
|
}
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
size: 9999
|
|
84
|
-
}
|
|
85
|
-
}).then(function (r) {
|
|
86
|
-
var _r$data;
|
|
87
|
-
var arr = (_r$data = r.data) !== null && _r$data !== void 0 ? _r$data : [];
|
|
88
|
-
_options.push.apply(_options, _toConsumableArray(arr.map(function (_) {
|
|
89
|
-
return {
|
|
90
|
-
label: _.value,
|
|
91
|
-
value: _.value,
|
|
92
|
-
id: _.id
|
|
93
|
-
};
|
|
94
|
-
})));
|
|
95
|
-
set__options(_options);
|
|
96
|
-
});
|
|
97
|
-
} else {
|
|
98
|
-
set__options(_options);
|
|
40
|
+
if (minDate) {
|
|
41
|
+
if (minDate === 'now') {
|
|
42
|
+
return current < dayjs().endOf('day');
|
|
43
|
+
}
|
|
44
|
+
return current < dayjs(minDate).endOf('day');
|
|
99
45
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
setTimeout(function () {
|
|
104
|
-
var thisValue = value;
|
|
105
|
-
if (!_memorable || !thisValue || __options.some(function (_) {
|
|
106
|
-
return _.value === thisValue;
|
|
107
|
-
})) return;
|
|
108
|
-
var data = {
|
|
109
|
-
key: _memorieskey,
|
|
110
|
-
name: _memoriesname,
|
|
111
|
-
value: thisValue
|
|
112
|
-
};
|
|
113
|
-
request.post("/api/text-memories", data, {
|
|
114
|
-
ignore_usr: true
|
|
115
|
-
}).then(init);
|
|
116
|
-
}, 10);
|
|
117
|
-
}
|
|
118
|
-
function remove(item) {
|
|
119
|
-
request["delete"]("/api/text-memories/".concat(item.id), {
|
|
120
|
-
params: {},
|
|
121
|
-
ignore_usr: true
|
|
122
|
-
}).then(function (r) {
|
|
123
|
-
init();
|
|
124
|
-
if (value === item.label) {
|
|
125
|
-
safeOnChange('');
|
|
46
|
+
if (maxDate) {
|
|
47
|
+
if (maxDate === 'now') {
|
|
48
|
+
return current > dayjs().endOf('day');
|
|
126
49
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
init: init,
|
|
133
|
-
options: __options,
|
|
134
|
-
remove: remove,
|
|
135
|
-
init_value: init_value
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function MyAutoCompleteInner(props) {
|
|
139
|
-
var _props$popupMatchSele = props.popupMatchSelectWidth,
|
|
140
|
-
popupMatchSelectWidth = _props$popupMatchSele === void 0 ? 120 : _props$popupMatchSele,
|
|
141
|
-
_props$getPopupContai = props.getPopupContainer,
|
|
142
|
-
getPopupContainer = _props$getPopupContai === void 0 ? function () {
|
|
143
|
-
return document.body;
|
|
144
|
-
} : _props$getPopupContai,
|
|
145
|
-
_options = props.options,
|
|
146
|
-
_props$style = props.style,
|
|
147
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
148
|
-
defaultValue = props.defaultValue,
|
|
149
|
-
value = props.value,
|
|
150
|
-
placeholder = props.placeholder,
|
|
151
|
-
width = props.width,
|
|
152
|
-
onChange = props.onChange,
|
|
153
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
154
|
-
var _style = getInputStyle(_objectSpread({}, props));
|
|
155
|
-
var _useConfig_MyAutoComp = useConfig_MyAutoComplete(props),
|
|
156
|
-
safeOnChange = _useConfig_MyAutoComp.safeOnChange,
|
|
157
|
-
onBlur = _useConfig_MyAutoComp.onBlur,
|
|
158
|
-
options = _useConfig_MyAutoComp.options,
|
|
159
|
-
remove = _useConfig_MyAutoComp.remove,
|
|
160
|
-
init_value = _useConfig_MyAutoComp.init_value;
|
|
161
|
-
return /*#__PURE__*/React__default.createElement(AutoComplete
|
|
162
|
-
// dropdownStyle={{ minWidth: 180 }}
|
|
163
|
-
, _objectSpread(_objectSpread({
|
|
164
|
-
// dropdownStyle={{ minWidth: 180 }}
|
|
165
|
-
title: JSON.stringify(options),
|
|
166
|
-
popupMatchSelectWidth: popupMatchSelectWidth,
|
|
50
|
+
return current > dayjs(maxDate).endOf('day');
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}, [validDate, maxDate, minDate, format]);
|
|
54
|
+
return /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(RangePicker_L, _objectSpread(_objectSpread({
|
|
167
55
|
style: _style,
|
|
168
|
-
// bordered={false}
|
|
169
|
-
allowClear: true
|
|
170
|
-
}, rest), {}, {
|
|
171
|
-
value: init_value !== null && init_value !== void 0 ? init_value : defaultValue,
|
|
172
|
-
onBlur: onBlur,
|
|
173
|
-
onChange: safeOnChange,
|
|
174
|
-
// options={options}
|
|
175
56
|
getPopupContainer: getPopupContainer,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
display: 'flex',
|
|
184
|
-
justifyContent: 'space-between'
|
|
185
|
-
}
|
|
186
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
187
|
-
title: item.label,
|
|
188
|
-
style: {
|
|
189
|
-
flex: 1,
|
|
190
|
-
textOverflow: 'ellipsis',
|
|
191
|
-
overflow: 'hidden',
|
|
192
|
-
whiteSpace: 'nowrap',
|
|
193
|
-
color: item.warning ? 'red' : ''
|
|
194
|
-
}
|
|
195
|
-
}, item.label), item.id ? /*#__PURE__*/React__default.createElement(Button, {
|
|
196
|
-
title: "\u5220\u9664",
|
|
197
|
-
size: 'small',
|
|
198
|
-
type: 'dashed',
|
|
199
|
-
icon: /*#__PURE__*/React__default.createElement(CloseOutlined, null),
|
|
200
|
-
onClick: function onClick(e) {
|
|
201
|
-
e.stopPropagation();
|
|
202
|
-
var ok = confirm('确定删除吗?');
|
|
203
|
-
ok && remove(item);
|
|
204
|
-
}
|
|
205
|
-
}) : null));
|
|
206
|
-
}));
|
|
57
|
+
value: value,
|
|
58
|
+
onChange: handleChange,
|
|
59
|
+
disabledDate: disabledDate,
|
|
60
|
+
format: format
|
|
61
|
+
}, rest), {}, {
|
|
62
|
+
placeholder: ['开始', '结束']
|
|
63
|
+
})));
|
|
207
64
|
}
|
|
208
|
-
|
|
65
|
+
var RangePicker_ = /*#__PURE__*/memo(MyRangePickerInner, areEqual);
|
|
66
|
+
export { RangePicker_ as default };
|