@vtx/components 4.0.0-beta.8 → 4.0.0-beta.80
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/es/index.js +3 -0
- package/es/utils/filterSpecialCharacters.js +47 -46
- package/es/utils/index.js +1 -2
- package/es/vtx-combogrid/Combogrid.js +5 -4
- package/es/vtx-combogrid/index.js +7 -4
- package/es/vtx-datagrid/Store/Provide.js +106 -137
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/es/vtx-datagrid/columnState.js +91 -0
- package/es/vtx-datagrid/index.js +124 -32
- package/es/vtx-datagrid/mergeComponents.js +15 -0
- package/es/vtx-datagrid/renderColumnButtons.js +30 -11
- package/es/vtx-datagrid/style/index.js +102 -20
- package/es/vtx-date-picker/QdatePicker.js +1 -1
- package/es/vtx-descriptions/Descriptions.js +29 -0
- package/es/vtx-descriptions/index.js +3 -0
- package/es/vtx-descriptions/style/index.js +19 -0
- package/es/vtx-ellipsis-text/index.js +7 -2
- package/es/vtx-ellipsis-text/style/index.js +3 -1
- package/es/vtx-export/index.js +25 -25
- package/es/vtx-export-async/History.js +11 -3
- package/es/vtx-export-async/index.js +45 -15
- package/es/vtx-export-async/util.js +16 -5
- package/es/vtx-form-layout/Card.js +10 -10
- package/es/vtx-form-layout/Divider.js +1 -1
- package/es/vtx-form-layout/FormItem.js +16 -16
- package/es/vtx-form-layout/Pane.js +23 -12
- package/es/vtx-icon/index.js +54 -45
- package/es/vtx-icon/index.js1 +90 -0
- package/es/vtx-image/Preview.js +11 -6
- package/es/vtx-image/style/index.js +0 -1
- package/es/vtx-import/index.js +207 -65
- package/es/vtx-import/result.js +28 -26
- package/es/vtx-import/style/index.js +16 -1
- package/es/vtx-import2/Content.js +2 -1
- package/es/vtx-import2/index.js +30 -19
- package/es/vtx-import2/style/index.js +60 -9
- package/es/vtx-modal/index.js +9 -4
- package/es/vtx-page-layout/style/index.js +4 -2
- package/es/vtx-provider/index.js +7 -3
- package/es/vtx-provider/locale/en_US.js +57 -3
- package/es/vtx-provider/locale/zh_CN.js +57 -3
- package/es/vtx-search/index.js +13 -9
- package/es/vtx-search/style/index.js +2 -1
- package/es/vtx-select/index.js +102 -36
- package/es/vtx-select/style/index.js +11 -56
- package/es/vtx-signature/index.js +5 -4
- package/es/vtx-signature/style/index.js +1 -1
- package/es/vtx-split-pane/Resizer.js +0 -1
- package/es/vtx-split-pane/SplitPane.js +42 -34
- package/es/vtx-split-pane/style/index.js +8 -112
- package/es/vtx-time-picker/index.js +27 -1
- package/es/vtx-transfer/Transfer.js +29 -0
- package/es/vtx-transfer/index.js +3 -0
- package/es/vtx-transfer/style/index.js +19 -0
- package/es/vtx-transfer-select/TransferSelect.js +143 -0
- package/es/vtx-transfer-select/index.js +3 -0
- package/es/vtx-transfer-select/style/index.js +19 -0
- package/es/vtx-tree/index.js +98 -35
- package/es/vtx-tree-select/index.js +71 -105
- package/es/vtx-tree-select/style/index.js +9 -3
- package/es/vtx-upload/FilePreview.js +2 -1
- package/es/vtx-wang-editor/index.js +93 -39
- package/es/vtx-wang-editor/wangEditorUtil.js +4 -0
- package/lib/index.js +36 -0
- package/lib/utils/filterSpecialCharacters.js +48 -46
- package/lib/utils/index.js +0 -7
- package/lib/vtx-combogrid/Combogrid.js +5 -4
- package/lib/vtx-combogrid/index.js +7 -4
- package/lib/vtx-datagrid/Store/Provide.js +113 -143
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/lib/vtx-datagrid/columnState.js +100 -0
- package/lib/vtx-datagrid/index.js +124 -32
- package/lib/vtx-datagrid/mergeComponents.js +21 -0
- package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
- package/lib/vtx-datagrid/style/index.js +102 -20
- package/lib/vtx-date-picker/QdatePicker.js +1 -1
- package/lib/vtx-descriptions/Descriptions.js +38 -0
- package/lib/vtx-descriptions/index.js +15 -0
- package/lib/vtx-descriptions/style/index.js +25 -0
- package/lib/vtx-ellipsis-text/index.js +7 -2
- package/lib/vtx-ellipsis-text/style/index.js +3 -1
- package/lib/vtx-export/index.js +26 -26
- package/lib/vtx-export-async/History.js +11 -3
- package/lib/vtx-export-async/index.js +43 -13
- package/lib/vtx-export-async/util.js +16 -5
- package/lib/vtx-form-layout/Card.js +9 -9
- package/lib/vtx-form-layout/Divider.js +1 -1
- package/lib/vtx-form-layout/FormItem.js +16 -16
- package/lib/vtx-form-layout/Pane.js +22 -11
- package/lib/vtx-icon/index.js +54 -52
- package/lib/vtx-icon/index.js1 +90 -0
- package/lib/vtx-image/Preview.js +11 -6
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-import/index.js +205 -63
- package/lib/vtx-import/result.js +29 -27
- package/lib/vtx-import/style/index.js +16 -1
- package/lib/vtx-import2/Content.js +2 -1
- package/lib/vtx-import2/index.js +29 -18
- package/lib/vtx-import2/style/index.js +60 -9
- package/lib/vtx-modal/index.js +9 -4
- package/lib/vtx-page-layout/style/index.js +4 -2
- package/lib/vtx-provider/index.js +7 -3
- package/lib/vtx-provider/locale/en_US.js +57 -3
- package/lib/vtx-provider/locale/zh_CN.js +57 -3
- package/lib/vtx-search/index.js +13 -9
- package/lib/vtx-search/style/index.js +2 -1
- package/lib/vtx-select/index.js +104 -38
- package/lib/vtx-select/style/index.js +11 -56
- package/lib/vtx-signature/index.js +4 -3
- package/lib/vtx-signature/style/index.js +1 -1
- package/lib/vtx-split-pane/Resizer.js +0 -1
- package/lib/vtx-split-pane/SplitPane.js +40 -31
- package/lib/vtx-split-pane/style/index.js +8 -112
- package/lib/vtx-time-picker/index.js +27 -1
- package/lib/vtx-transfer/Transfer.js +38 -0
- package/lib/vtx-transfer/index.js +15 -0
- package/lib/vtx-transfer/style/index.js +25 -0
- package/lib/vtx-transfer-select/TransferSelect.js +151 -0
- package/lib/vtx-transfer-select/index.js +15 -0
- package/lib/vtx-transfer-select/style/index.js +25 -0
- package/lib/vtx-tree/index.js +96 -33
- package/lib/vtx-tree-select/index.js +71 -105
- package/lib/vtx-tree-select/style/index.js +9 -3
- package/lib/vtx-upload/FilePreview.js +2 -1
- package/lib/vtx-wang-editor/index.js +91 -37
- package/lib/vtx-wang-editor/wangEditorUtil.js +4 -0
- package/package.json +47 -32
- package/es/utils/hooks/useFetchData/index.js +0 -82
- package/lib/utils/hooks/useFetchData/index.js +0 -89
package/lib/vtx-select/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = exports.VtxSelect = void 0;
|
|
8
7
|
var _antd = require("antd");
|
|
9
|
-
var
|
|
8
|
+
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _style = require("./style");
|
|
12
11
|
var _icons = require("@ant-design/icons");
|
|
@@ -14,9 +13,12 @@ var _vtxIcon = _interopRequireDefault(require("../vtx-icon"));
|
|
|
14
13
|
var _utils = require("../utils");
|
|
15
14
|
var _vtxProvider = require("../vtx-provider");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
var _excluded = ["value", "mode", "size", "onChange", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "showAll", "selectStyle", "selectAll", "selectSearchAll", "defaultBindBodyToPopupContainer", "customEnumText", "showSearch", "optionFilterProp", "onSearch"],
|
|
17
|
+
_excluded2 = ["onSearch", "optionFilterProp"];
|
|
17
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
20
22
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
21
23
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
22
24
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -27,6 +29,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
27
29
|
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; }
|
|
28
30
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
29
31
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
32
|
+
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; }
|
|
33
|
+
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; }
|
|
30
34
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
35
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
32
36
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -34,6 +38,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
34
38
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
35
39
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
40
|
var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
41
|
+
var _props$options;
|
|
37
42
|
var intl = (0, _vtxProvider.useIntl)();
|
|
38
43
|
var _useState = (0, _react.useState)(0),
|
|
39
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -66,16 +71,25 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
66
71
|
_props$defaultBindBod = props.defaultBindBodyToPopupContainer,
|
|
67
72
|
defaultBindBodyToPopupContainer = _props$defaultBindBod === void 0 ? true : _props$defaultBindBod,
|
|
68
73
|
_props$customEnumText = props.customEnumText,
|
|
69
|
-
customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText
|
|
74
|
+
customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText,
|
|
75
|
+
showSearch = props.showSearch,
|
|
76
|
+
optionFilterProp = props.optionFilterProp,
|
|
77
|
+
_onSearch = props.onSearch,
|
|
78
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
70
79
|
var TextEnum = _objectSpread({
|
|
71
80
|
selectAllText: intl.getMessage('select.selectAll', '全选'),
|
|
72
81
|
defaultPlaceholderText: intl.getMessage('tableForm.selectPlaceholder', '请选择'),
|
|
73
82
|
emptyDescriptionText: intl.getMessage('select.empty', '暂无数据')
|
|
74
83
|
}, customEnumText);
|
|
84
|
+
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
85
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
86
|
+
var prefixCls = getPrefixCls('select', props.prefixCls);
|
|
87
|
+
var _useStyle = (0, _style.useStyle)(prefixCls),
|
|
88
|
+
wrapSSR = _useStyle.wrapSSR,
|
|
89
|
+
hashId = _useStyle.hashId;
|
|
75
90
|
(0, _react.useEffect)(function () {
|
|
76
91
|
if ((mode === 'multiple' || mode === 'tags') && elRef.current) {
|
|
77
92
|
var element = elRef.current;
|
|
78
|
-
|
|
79
93
|
// 立即设置一次
|
|
80
94
|
setPopWidth(element.clientWidth);
|
|
81
95
|
|
|
@@ -100,21 +114,51 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
100
114
|
};
|
|
101
115
|
}
|
|
102
116
|
}, [mode]);
|
|
103
|
-
var newChildren = props.children ?
|
|
117
|
+
var newChildren = props.children ? _react.default.Children.toArray(props.children) : ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.map(function (v) {
|
|
118
|
+
return _objectSpread(_objectSpread({}, v), {}, {
|
|
119
|
+
key: v.value,
|
|
120
|
+
props: _objectSpread(_objectSpread({}, v), {}, {
|
|
121
|
+
children: v.label
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
})) || [];
|
|
125
|
+
var getOptionValue = function getOptionValue(item) {
|
|
126
|
+
var _ref, _itemProps$value;
|
|
127
|
+
var itemProps = (item === null || item === void 0 ? void 0 : item.props) || {};
|
|
128
|
+
return (_ref = (_itemProps$value = itemProps.value) !== null && _itemProps$value !== void 0 ? _itemProps$value : item.value) !== null && _ref !== void 0 ? _ref : item.key;
|
|
129
|
+
};
|
|
130
|
+
var getOptionLabel = function getOptionLabel(item) {
|
|
131
|
+
var _ref2, _itemProps$children;
|
|
132
|
+
var itemProps = (item === null || item === void 0 ? void 0 : item.props) || {};
|
|
133
|
+
return (_ref2 = (_itemProps$children = itemProps.children) !== null && _itemProps$children !== void 0 ? _itemProps$children : itemProps.label) !== null && _ref2 !== void 0 ? _ref2 : item.label;
|
|
134
|
+
};
|
|
135
|
+
var getSelectedValue = function getSelectedValue(item) {
|
|
136
|
+
if ((0, _utils.isObject)(item)) {
|
|
137
|
+
var _item$value;
|
|
138
|
+
return (_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : item.key;
|
|
139
|
+
}
|
|
140
|
+
return item;
|
|
141
|
+
};
|
|
142
|
+
var normalizedOptions = newChildren.map(function (item) {
|
|
143
|
+
return {
|
|
144
|
+
value: getOptionValue(item),
|
|
145
|
+
label: getOptionLabel(item),
|
|
146
|
+
raw: item
|
|
147
|
+
};
|
|
148
|
+
});
|
|
104
149
|
var getContent = function getContent() {
|
|
105
150
|
var child = {};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
child[item.key] = item === null || item === void 0 || (_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.children;
|
|
151
|
+
normalizedOptions.forEach(function (item) {
|
|
152
|
+
child[item.value] = item.label;
|
|
109
153
|
});
|
|
110
154
|
var getChildren = function getChildren() {
|
|
111
155
|
var child = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
112
156
|
var value = arguments.length > 1 ? arguments[1] : undefined;
|
|
113
|
-
var key = (
|
|
157
|
+
var key = getSelectedValue(value);
|
|
114
158
|
return child[key] || '';
|
|
115
159
|
};
|
|
116
160
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
117
|
-
className: "
|
|
161
|
+
className: (0, _classnames2.default)("".concat(prefixCls, "-all-list"), hashId),
|
|
118
162
|
children: Array.isArray(value) && value.length ? value.map(function (item, index) {
|
|
119
163
|
var name = getChildren(child, item);
|
|
120
164
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tag, {
|
|
@@ -126,10 +170,13 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
126
170
|
e.preventDefault();
|
|
127
171
|
var valueClone = _toConsumableArray(value);
|
|
128
172
|
valueClone.splice(index, 1);
|
|
129
|
-
var
|
|
130
|
-
|
|
173
|
+
var selectedValueSet = new Set(valueClone.map(getSelectedValue));
|
|
174
|
+
var options = normalizedOptions.filter(function (ite) {
|
|
175
|
+
return selectedValueSet.has(ite.value);
|
|
176
|
+
}).map(function (ite) {
|
|
177
|
+
return ite.raw;
|
|
131
178
|
});
|
|
132
|
-
_onChange(valueClone, options);
|
|
179
|
+
_onChange && _onChange(valueClone, options);
|
|
133
180
|
},
|
|
134
181
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
135
182
|
title: name,
|
|
@@ -142,16 +189,45 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
142
189
|
})
|
|
143
190
|
});
|
|
144
191
|
};
|
|
145
|
-
var
|
|
146
|
-
|
|
147
|
-
|
|
192
|
+
var defaultOptionFilterProp = ['label', 'children'];
|
|
193
|
+
var handleSearch = function handleSearch(value) {
|
|
194
|
+
setSearchValue(value ? String(value).toLowerCase() : '');
|
|
195
|
+
_onSearch && _onSearch(value);
|
|
196
|
+
};
|
|
197
|
+
var getSearchProps = function getSearchProps() {
|
|
198
|
+
if (showSearch && _typeof(showSearch) === 'object') {
|
|
199
|
+
var showSearchOnSearch = showSearch.onSearch,
|
|
200
|
+
showSearchOptionFilterProp = showSearch.optionFilterProp,
|
|
201
|
+
searchConfig = _objectWithoutProperties(showSearch, _excluded2);
|
|
202
|
+
return {
|
|
203
|
+
showSearch: _objectSpread(_objectSpread({}, searchConfig), {}, {
|
|
204
|
+
optionFilterProp: showSearchOptionFilterProp || optionFilterProp || defaultOptionFilterProp,
|
|
205
|
+
onSearch: function onSearch(value) {
|
|
206
|
+
setSearchValue(value ? String(value).toLowerCase() : '');
|
|
207
|
+
showSearchOnSearch && showSearchOnSearch(value);
|
|
208
|
+
_onSearch && _onSearch(value);
|
|
209
|
+
}
|
|
210
|
+
})
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
showSearch: showSearch === undefined ? true : showSearch,
|
|
215
|
+
optionFilterProp: optionFilterProp || defaultOptionFilterProp
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
var newProps = _objectSpread(_objectSpread(_objectSpread({}, getSearchProps()), {}, {
|
|
148
219
|
placeholder: TextEnum.defaultPlaceholderText,
|
|
149
|
-
allowClear: true
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
220
|
+
allowClear: true,
|
|
221
|
+
value: value,
|
|
222
|
+
mode: mode,
|
|
223
|
+
size: size,
|
|
224
|
+
//同步button大小
|
|
225
|
+
onChange: _onChange,
|
|
226
|
+
maxTagCount: maxTagCount,
|
|
227
|
+
maxTagTextLength: maxTagTextLength,
|
|
228
|
+
maxTagPlaceholder: maxTagPlaceholder
|
|
229
|
+
}, rest), {}, {
|
|
230
|
+
onSearch: handleSearch,
|
|
155
231
|
onBlur: function onBlur(e) {
|
|
156
232
|
setSearchValue('');
|
|
157
233
|
props.onBlur && props.onBlur(e);
|
|
@@ -180,7 +256,7 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
180
256
|
if (e.target.checked) {
|
|
181
257
|
var tempChildren = newChildren.filter(function (item) {
|
|
182
258
|
if (selectSearchAll && searchValue) {
|
|
183
|
-
return String(item
|
|
259
|
+
return String(getOptionLabel(item)).toLowerCase().indexOf(searchValue) > -1;
|
|
184
260
|
}
|
|
185
261
|
return true;
|
|
186
262
|
});
|
|
@@ -188,13 +264,13 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
188
264
|
if (props.labelInValue) {
|
|
189
265
|
keys = tempChildren.map(function (item) {
|
|
190
266
|
return {
|
|
191
|
-
label: item
|
|
192
|
-
value: item
|
|
267
|
+
label: getOptionLabel(item),
|
|
268
|
+
value: getOptionValue(item)
|
|
193
269
|
};
|
|
194
270
|
});
|
|
195
271
|
} else {
|
|
196
272
|
keys = tempChildren.map(function (item) {
|
|
197
|
-
return item
|
|
273
|
+
return getOptionValue(item);
|
|
198
274
|
});
|
|
199
275
|
}
|
|
200
276
|
_onChange && _onChange(keys, tempChildren);
|
|
@@ -214,21 +290,11 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
214
290
|
});
|
|
215
291
|
}
|
|
216
292
|
}
|
|
217
|
-
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
218
|
-
getPrefixCls = _useContext.getPrefixCls;
|
|
219
|
-
var prefixCls = getPrefixCls('select', props.prefixCls);
|
|
220
|
-
var _useStyle = (0, _style.useStyle)(prefixCls),
|
|
221
|
-
wrapSSR = _useStyle.wrapSSR,
|
|
222
|
-
hashId = _useStyle.hashId;
|
|
223
293
|
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
224
|
-
className: (0,
|
|
225
|
-
'vtx-multi-select': mode == 'multiple' || mode == 'tags'
|
|
226
|
-
}),
|
|
294
|
+
className: (0, _classnames2.default)(prefixCls, hashId, _defineProperty({}, "".concat(prefixCls, "-multi"), mode == 'multiple' || mode == 'tags')),
|
|
227
295
|
id: elId.current,
|
|
228
296
|
ref: elRef,
|
|
229
|
-
style: _objectSpread(
|
|
230
|
-
paddingRight: (mode == 'multiple' || mode == 'tags') && showAll ? 32 : 0
|
|
231
|
-
}),
|
|
297
|
+
style: _objectSpread({}, props.style),
|
|
232
298
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space.Compact, {
|
|
233
299
|
style: {
|
|
234
300
|
width: '100%'
|
|
@@ -13,66 +13,21 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
var genVtxSelectStyle = function genVtxSelectStyle(token) {
|
|
15
15
|
var componentCls = token.componentCls;
|
|
16
|
-
return _defineProperty(_defineProperty({}, componentCls, {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
top: '0',
|
|
24
|
-
verticalAlign: 'top'
|
|
25
|
-
},
|
|
26
|
-
'.vtx-all-list': {
|
|
27
|
-
position: 'absolute',
|
|
28
|
-
zIndex: 999,
|
|
29
|
-
boxSizing: 'border-box',
|
|
30
|
-
width: '100%',
|
|
31
|
-
padding: '5px',
|
|
32
|
-
boxShadow: '0 2px 8px #d9d9d9',
|
|
33
|
-
backgroundColor: 'red !important'
|
|
34
|
-
},
|
|
35
|
-
'.ant-select-selection--multiple': {
|
|
36
|
-
maxHeight: '32px',
|
|
37
|
-
overflow: 'hidden'
|
|
38
|
-
}
|
|
39
|
-
}), '.vtx-multi-select', {
|
|
40
|
-
position: 'relative',
|
|
41
|
-
display: 'inline-block',
|
|
42
|
-
width: '100%',
|
|
43
|
-
maxHeight: '32px !important',
|
|
44
|
-
boxSizing: 'border-box',
|
|
45
|
-
'.vtx-select-count': {
|
|
46
|
-
position: 'absolute',
|
|
47
|
-
top: 0,
|
|
48
|
-
right: 0,
|
|
49
|
-
verticalAlign: 'top',
|
|
50
|
-
borderLeft: 'none',
|
|
51
|
-
borderTopLeftRadius: 0,
|
|
52
|
-
'border-bottom-left-radius': 0
|
|
53
|
-
},
|
|
54
|
-
'.vtx-all-list': {
|
|
55
|
-
position: 'absolute',
|
|
56
|
-
zIndex: 999,
|
|
57
|
-
boxSizing: 'border-box',
|
|
58
|
-
width: '100%',
|
|
59
|
-
padding: '5px',
|
|
60
|
-
boxShadow: '0 2px 8px #d9d9d9'
|
|
61
|
-
},
|
|
62
|
-
'.ant-select-selector': {
|
|
63
|
-
'border-top-right-radius': 0,
|
|
64
|
-
'border-bottom-right-radius': 0,
|
|
65
|
-
maxHeight: '32px !important',
|
|
66
|
-
overflow: 'hidden'
|
|
67
|
-
},
|
|
68
|
-
'.ant-select-selection--multiple': {
|
|
69
|
-
maxHeight: '32px',
|
|
70
|
-
overflow: 'hidden'
|
|
16
|
+
return _defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty({
|
|
17
|
+
width: "100%"
|
|
18
|
+
}, '.ant-select', {
|
|
19
|
+
overflow: "hidden"
|
|
20
|
+
})), "".concat(componentCls, "-multi"), {
|
|
21
|
+
".ant-select-content": {
|
|
22
|
+
flexWrap: "nowrap"
|
|
71
23
|
}
|
|
24
|
+
}), "".concat(componentCls, "-all-list"), {
|
|
25
|
+
maxHeight: 300,
|
|
26
|
+
overflowY: "auto"
|
|
72
27
|
});
|
|
73
28
|
};
|
|
74
29
|
function useStyle(prefixCls) {
|
|
75
|
-
return (0, _vtxProvider.useStyle)('
|
|
30
|
+
return (0, _vtxProvider.useStyle)('', function (token) {
|
|
76
31
|
var vtxSelectToken = _objectSpread(_objectSpread({}, token), {}, {
|
|
77
32
|
componentCls: ".".concat(prefixCls)
|
|
78
33
|
});
|
|
@@ -53,7 +53,7 @@ var VtxSignature = exports.VtxSignature = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
53
53
|
clear();
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
(0, _react.
|
|
56
|
+
(0, _react.useLayoutEffect)(function () {
|
|
57
57
|
signaturePad.current = new _signature_pad.default(canvasRef.current, {
|
|
58
58
|
dotSize: dotSize,
|
|
59
59
|
minWidth: minWidth,
|
|
@@ -74,7 +74,9 @@ var VtxSignature = exports.VtxSignature = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
74
74
|
_onEnd && _onEnd();
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
|
-
|
|
77
|
+
setTimeout(function () {
|
|
78
|
+
resizeCanvas();
|
|
79
|
+
}, 0);
|
|
78
80
|
window.addEventListener('resize', (0, _debounce.default)(resizeCanvas, 150));
|
|
79
81
|
return function () {
|
|
80
82
|
window.removeEventListener('resize', (0, _debounce.default)(resizeCanvas, 150));
|
|
@@ -91,7 +93,6 @@ var VtxSignature = exports.VtxSignature = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
91
93
|
};
|
|
92
94
|
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
93
95
|
className: (0, _classnames.default)(prefixCls, hashId),
|
|
94
|
-
ref: ref,
|
|
95
96
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
96
97
|
className: (0, _classnames.default)("".concat(prefixCls, "--body")),
|
|
97
98
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("canvas", {
|
|
@@ -17,7 +17,7 @@ var genVtxSignatureStyle = function genVtxSignatureStyle(token) {
|
|
|
17
17
|
position: 'relative',
|
|
18
18
|
display: 'flex',
|
|
19
19
|
flexDirection: 'column',
|
|
20
|
-
height:
|
|
20
|
+
height: 300,
|
|
21
21
|
padding: '16px',
|
|
22
22
|
backgroundColor: token.colorBgBase,
|
|
23
23
|
border: "1px solid ".concat(token.colorBorder),
|
|
@@ -5,16 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _antd = require("antd");
|
|
8
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _reactResizablePanels = require("react-resizable-panels");
|
|
11
|
-
var _Resizer = _interopRequireDefault(require("./Resizer"));
|
|
12
|
-
var _style = require("./style");
|
|
13
11
|
var _vtxProvider = require("../vtx-provider");
|
|
12
|
+
var _style = require("./style");
|
|
14
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
var _excluded = ["children", "defaultSize", "minSize", "maxSize", "style", "direction", "orientation", "handle", "draggerIcon"];
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
22
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
+
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; }
|
|
24
|
+
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; }
|
|
18
25
|
function removeNullChildren(children) {
|
|
19
26
|
return _react.default.Children.toArray(children).filter(function (c) {
|
|
20
27
|
return c;
|
|
@@ -27,42 +34,44 @@ function VtxSplitPane(props) {
|
|
|
27
34
|
var _useStyle = (0, _style.useStyle)(prefixCls),
|
|
28
35
|
wrapSSR = _useStyle.wrapSSR,
|
|
29
36
|
hashId = _useStyle.hashId;
|
|
30
|
-
var splitPane = (0, _react.useRef)();
|
|
31
37
|
var children = props.children,
|
|
38
|
+
defaultSize = props.defaultSize,
|
|
39
|
+
minSize = props.minSize,
|
|
40
|
+
maxSize = props.maxSize,
|
|
32
41
|
style = props.style,
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
direction = props.direction,
|
|
43
|
+
orientation = props.orientation,
|
|
44
|
+
handle = props.handle,
|
|
45
|
+
draggerIcon = props.draggerIcon,
|
|
46
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
35
47
|
var notNullChildren = removeNullChildren(children);
|
|
36
|
-
var
|
|
48
|
+
var mergedOrientation = orientation || direction;
|
|
49
|
+
var mergedDraggerIcon = draggerIcon !== null && draggerIcon !== void 0 ? draggerIcon : handle;
|
|
37
50
|
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
|
-
className: (0, _classnames.default)("".concat(prefixCls
|
|
39
|
-
ref: splitPane,
|
|
51
|
+
className: (0, _classnames.default)("".concat(prefixCls), hashId),
|
|
40
52
|
style: style,
|
|
41
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
42
|
-
|
|
53
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Splitter, _objectSpread(_objectSpread({}, rest), {}, {
|
|
54
|
+
orientation: mergedOrientation,
|
|
55
|
+
draggerIcon: mergedDraggerIcon,
|
|
43
56
|
children: notNullChildren === null || notNullChildren === void 0 ? void 0 : notNullChildren.map(function (v, index) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
})
|
|
59
|
-
})]
|
|
60
|
-
});
|
|
57
|
+
var _v$props;
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Fragment, {
|
|
59
|
+
children: /*#__PURE__*/(0, _react.cloneElement)(notNullChildren[index], _objectSpread(_objectSpread(_objectSpread({}, index === 0 ? {
|
|
60
|
+
max: maxSize,
|
|
61
|
+
min: minSize,
|
|
62
|
+
defaultSize: defaultSize
|
|
63
|
+
} : {}), v.props), {}, {
|
|
64
|
+
collapsible: _objectSpread({
|
|
65
|
+
start: true,
|
|
66
|
+
end: true,
|
|
67
|
+
showCollapsibleIcon: 'auto'
|
|
68
|
+
}, (_v$props = v.props) === null || _v$props === void 0 ? void 0 : _v$props.collapsible)
|
|
69
|
+
}))
|
|
70
|
+
}, v.key || index);
|
|
61
71
|
})
|
|
62
|
-
})
|
|
72
|
+
}))
|
|
63
73
|
}));
|
|
64
74
|
}
|
|
65
75
|
VtxSplitPane.propTypes = {};
|
|
66
|
-
VtxSplitPane.
|
|
67
|
-
VtxSplitPane.Pane = _reactResizablePanels.Panel;
|
|
76
|
+
VtxSplitPane.Pane = _antd.Splitter.Panel;
|
|
68
77
|
var _default = exports.default = VtxSplitPane;
|
|
@@ -13,121 +13,17 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
var genVtxSplitPaneStyle = function genVtxSplitPaneStyle(token) {
|
|
15
15
|
var componentCls = token.componentCls;
|
|
16
|
-
return _defineProperty(
|
|
16
|
+
return _defineProperty({}, componentCls, {
|
|
17
17
|
height: '100%',
|
|
18
18
|
overflow: 'hidden',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
height: '100%',
|
|
26
|
-
width: 6,
|
|
27
|
-
zIndex: 1
|
|
28
|
-
}, '&-left,&-right', {
|
|
29
|
-
position: 'absolute',
|
|
30
|
-
top: '50%',
|
|
31
|
-
zIndex: 1001,
|
|
32
|
-
opacity: 0,
|
|
33
|
-
width: '16px !important',
|
|
34
|
-
height: '24px !important',
|
|
35
|
-
backgroundColor: token.colorBorder,
|
|
36
|
-
color: token.colorTextSecondary,
|
|
37
|
-
borderColor: "transparent !important",
|
|
38
|
-
fontSize: 12,
|
|
39
|
-
'&:hover': {
|
|
40
|
-
color: token.colorTextSecondary,
|
|
41
|
-
backgroundColor: "".concat(token.colorPrimaryBg, " !important")
|
|
42
|
-
}
|
|
43
|
-
}), '&-left', {
|
|
44
|
-
transform: 'translate(-16px,-50%)'
|
|
45
|
-
}), '&-right', {
|
|
46
|
-
transform: 'translate(6px,-50%)'
|
|
47
|
-
}), '&::after', {
|
|
48
|
-
position: 'absolute',
|
|
49
|
-
content: "' '",
|
|
50
|
-
left: 0,
|
|
51
|
-
top: 0,
|
|
52
|
-
bottom: 0,
|
|
53
|
-
right: 4,
|
|
54
|
-
borderRadius: token.borderRadius
|
|
55
|
-
}), '&:hover', _defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
|
|
56
|
-
opacity: 1
|
|
57
|
-
})), '.ant-btn-icon', {
|
|
58
|
-
color: token.colorTextSecondary
|
|
59
|
-
})
|
|
60
|
-
}, "&[data-resize-handle-state='hover']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
|
|
61
|
-
opacity: 1
|
|
62
|
-
}), '.vtx-split-pane-outer-resizer::after', {
|
|
63
|
-
background: "linear-gradient(to bottom , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
|
|
64
|
-
})), "&[data-resize-handle-state='active']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
|
|
65
|
-
opacity: 1
|
|
66
|
-
}), '.vtx-split-pane-outer-resizer::after', {
|
|
67
|
-
background: "linear-gradient(to bottom , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
|
|
68
|
-
})), "&[data-resize-handle-state='drag']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
|
|
69
|
-
opacity: 1
|
|
70
|
-
}), '.vtx-split-pane-outer-resizer::after', {
|
|
71
|
-
background: "linear-gradient(to bottom , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
|
|
72
|
-
})), "&[data-resize-handle-state='inactive']", {
|
|
73
|
-
backgroundColor: 'transparent'
|
|
74
|
-
}),
|
|
75
|
-
'&-item': {
|
|
76
|
-
position: 'relative',
|
|
77
|
-
display: 'inline-block',
|
|
78
|
-
height: '100%',
|
|
79
|
-
verticalAlign: 'top'
|
|
19
|
+
backgroundColor: token.colorBgLayout,
|
|
20
|
+
'.ant-splitter-bar .ant-splitter-bar-dragger::before': {
|
|
21
|
+
background: 'transparent'
|
|
22
|
+
},
|
|
23
|
+
'.ant-splitter-bar .ant-splitter-bar-dragger-active::before': {
|
|
24
|
+
background: 'var(--ant-control-item-bg-active)'
|
|
80
25
|
}
|
|
81
|
-
}
|
|
82
|
-
borderRight: "1px solid ".concat(token.colorBorderSecondary),
|
|
83
|
-
'&:hover': {
|
|
84
|
-
borderRight: "1px solid ".concat(token.colorBorderSecondary),
|
|
85
|
-
transition: 'border-right 0.2s ease-in-out'
|
|
86
|
-
}
|
|
87
|
-
}), '&-resizer-right', {
|
|
88
|
-
borderLeft: "1px solid ".concat(token.colorBorderSecondary),
|
|
89
|
-
'&:hover': {
|
|
90
|
-
borderLeft: "1px solid ".concat(token.colorBorderSecondary),
|
|
91
|
-
transition: 'border-right 0.2s ease-in-out'
|
|
92
|
-
}
|
|
93
|
-
}), '&-resizer.disabled', {
|
|
94
|
-
cursor: 'not-allowed'
|
|
95
|
-
}), '&-resizer.disabled:hover', {
|
|
96
|
-
borderColor: 'transparent'
|
|
97
|
-
})), "".concat(componentCls, "-vertical"), _defineProperty({}, "".concat(componentCls, "-outer"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
98
|
-
'&-resizer': _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
99
|
-
width: '100%',
|
|
100
|
-
height: 6
|
|
101
|
-
}, '&-left,&-right', {
|
|
102
|
-
top: 'auto',
|
|
103
|
-
left: '50%',
|
|
104
|
-
height: '16px !important',
|
|
105
|
-
width: '24px !important'
|
|
106
|
-
}), '&-left', {
|
|
107
|
-
transform: 'translate(-50%,-16px)'
|
|
108
|
-
}), '&-right', {
|
|
109
|
-
transform: 'translate(-50%, 6px)'
|
|
110
|
-
}), '&::after', {
|
|
111
|
-
left: 0,
|
|
112
|
-
top: 0,
|
|
113
|
-
bottom: 4,
|
|
114
|
-
right: 0
|
|
115
|
-
})
|
|
116
|
-
}, "&[data-resize-handle-state='hover']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
|
|
117
|
-
opacity: 1
|
|
118
|
-
}), '.vtx-split-pane-outer-resizer::after', {
|
|
119
|
-
background: "linear-gradient(to right , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
|
|
120
|
-
})), "&[data-resize-handle-state='active']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
|
|
121
|
-
opacity: 1
|
|
122
|
-
}), '.vtx-split-pane-outer-resizer::after', {
|
|
123
|
-
background: "linear-gradient(to right , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
|
|
124
|
-
})), "&[data-resize-handle-state='drag']", _defineProperty(_defineProperty({}, '.vtx-split-pane-outer-resizer-left,.vtx-split-pane-outer-resizer-right', {
|
|
125
|
-
opacity: 1
|
|
126
|
-
}), '.vtx-split-pane-outer-resizer::after', {
|
|
127
|
-
background: "linear-gradient(to right , rgba(0,0,0,0), ".concat(token.colorSplit, ", rgba(0,0,0,0)) !important")
|
|
128
|
-
})), "&[data-resize-handle-state='inactive']", {
|
|
129
|
-
backgroundColor: 'transparent'
|
|
130
|
-
})));
|
|
26
|
+
});
|
|
131
27
|
};
|
|
132
28
|
function useStyle(prefixCls) {
|
|
133
29
|
return (0, _vtxProvider.useStyle)(prefixCls, function (token) {
|