assui 3.1.54 → 3.1.56
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/LICENSE +21 -0
- package/es/label-select/index.d.ts +1 -0
- package/es/label-select/index.js +8 -2
- package/es/split-pane/index.d.ts +5 -5
- package/es/split-pane/index.js +17 -2
- package/lib/label-select/index.d.ts +1 -0
- package/lib/label-select/index.js +8 -2
- package/lib/split-pane/index.d.ts +5 -5
- package/lib/split-pane/index.js +21 -40
- package/package.json +3 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 assui
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -4,6 +4,7 @@ declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
|
4
4
|
export { Option };
|
|
5
5
|
export interface LabelSelectProps extends SelectProps {
|
|
6
6
|
label?: React.ReactNode;
|
|
7
|
+
onBlur?: (value: SelectProps['value']) => void;
|
|
7
8
|
}
|
|
8
9
|
declare const ForwardRefLabelSelect: React.ForwardRefExoticComponent<LabelSelectProps & React.RefAttributes<unknown>>;
|
|
9
10
|
export default ForwardRefLabelSelect;
|
package/es/label-select/index.js
CHANGED
|
@@ -37,7 +37,9 @@ var __read = this && this.__read || function (o, n) {
|
|
|
37
37
|
import React from 'react';
|
|
38
38
|
import useControllableValue from "ahooks/es/useControllableValue";
|
|
39
39
|
import Select from "antd/es/select";
|
|
40
|
-
import
|
|
40
|
+
import isArray from 'lodash/isArray';
|
|
41
|
+
import isUndefined from 'lodash/isUndefined';
|
|
42
|
+
import isNull from 'lodash/isNull';
|
|
41
43
|
import classNames from 'classnames';
|
|
42
44
|
import ArrowDropDownFilled from "a-icons/es/ArrowDropDownFilled";
|
|
43
45
|
import omit from 'lodash/omit';
|
|
@@ -74,7 +76,7 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
74
76
|
return /*#__PURE__*/React.createElement("div", {
|
|
75
77
|
className: classNames({
|
|
76
78
|
'label-select': true,
|
|
77
|
-
'label-select-label-scale': open || !isUndefined(value) && !isNull(value)
|
|
79
|
+
'label-select-label-scale': open || !isArray(value) && !isUndefined(value) && !isNull(value) || isArray(value) && value.length
|
|
78
80
|
}, className)
|
|
79
81
|
}, /*#__PURE__*/React.createElement(Select, __assign({
|
|
80
82
|
maxTagCount: 3,
|
|
@@ -85,6 +87,10 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
85
87
|
size: "large",
|
|
86
88
|
className: "label-select-selector",
|
|
87
89
|
onChange: handleChange,
|
|
90
|
+
onDeselect: function onDeselect() {
|
|
91
|
+
var _a;
|
|
92
|
+
(_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
93
|
+
},
|
|
88
94
|
onDropdownVisibleChange: onDropdownVisibleChange,
|
|
89
95
|
suffixIcon: /*#__PURE__*/React.createElement(ArrowDropDownFilled, null)
|
|
90
96
|
})), /*#__PURE__*/React.createElement("label", {
|
package/es/split-pane/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import SplitPane, { SplitPaneProps, Size, Split, SplitPaneState, PaneProps, Pane } from 'react-split-pane';
|
|
3
|
-
export { SplitPaneProps, Size, Split, SplitPaneState, PaneProps, Pane };
|
|
4
|
-
export default SplitPane;
|
|
1
|
+
import React from 'react';
|
|
5
2
|
/** 只做描述 */
|
|
6
|
-
export declare type
|
|
3
|
+
export declare type SplitPaneProps = {
|
|
7
4
|
/**
|
|
8
5
|
* 是否允许拖动
|
|
9
6
|
* @default true
|
|
@@ -56,4 +53,7 @@ export declare type SplitPaneDescProps = {
|
|
|
56
53
|
resizerClassName?: string;
|
|
57
54
|
/** 拖动固定步进值 */
|
|
58
55
|
step?: number;
|
|
56
|
+
children: React.ReactNode;
|
|
59
57
|
};
|
|
58
|
+
declare const SplitPane: React.FC<SplitPaneProps>;
|
|
59
|
+
export default SplitPane;
|
package/es/split-pane/index.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) {
|
|
6
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import RcSplitPane from 'react-split-pane';
|
|
15
|
+
var SplitPane = function SplitPane(props) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(RcSplitPane, __assign({}, props));
|
|
17
|
+
};
|
|
3
18
|
export default SplitPane;
|
|
@@ -4,6 +4,7 @@ declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
|
4
4
|
export { Option };
|
|
5
5
|
export interface LabelSelectProps extends SelectProps {
|
|
6
6
|
label?: React.ReactNode;
|
|
7
|
+
onBlur?: (value: SelectProps['value']) => void;
|
|
7
8
|
}
|
|
8
9
|
declare const ForwardRefLabelSelect: React.ForwardRefExoticComponent<LabelSelectProps & React.RefAttributes<unknown>>;
|
|
9
10
|
export default ForwardRefLabelSelect;
|
|
@@ -48,7 +48,9 @@ exports.Option = void 0;
|
|
|
48
48
|
var react_1 = __importDefault(require("react"));
|
|
49
49
|
var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
|
|
50
50
|
var select_1 = __importDefault(require("antd/lib/select"));
|
|
51
|
-
var
|
|
51
|
+
var isArray_1 = __importDefault(require("lodash/isArray"));
|
|
52
|
+
var isUndefined_1 = __importDefault(require("lodash/isUndefined"));
|
|
53
|
+
var isNull_1 = __importDefault(require("lodash/isNull"));
|
|
52
54
|
var classnames_1 = __importDefault(require("classnames"));
|
|
53
55
|
var ArrowDropDownFilled_1 = __importDefault(require("a-icons/lib/ArrowDropDownFilled"));
|
|
54
56
|
var omit_1 = __importDefault(require("lodash/omit"));
|
|
@@ -85,7 +87,7 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
85
87
|
return react_1["default"].createElement("div", {
|
|
86
88
|
className: (0, classnames_1["default"])({
|
|
87
89
|
'label-select': true,
|
|
88
|
-
'label-select-label-scale': open || !(0,
|
|
90
|
+
'label-select-label-scale': open || !(0, isArray_1["default"])(value) && !(0, isUndefined_1["default"])(value) && !(0, isNull_1["default"])(value) || (0, isArray_1["default"])(value) && value.length
|
|
89
91
|
}, className)
|
|
90
92
|
}, react_1["default"].createElement(select_1["default"], __assign({
|
|
91
93
|
maxTagCount: 3,
|
|
@@ -96,6 +98,10 @@ var LabelSelect = function LabelSelect(props, ref) {
|
|
|
96
98
|
size: "large",
|
|
97
99
|
className: "label-select-selector",
|
|
98
100
|
onChange: handleChange,
|
|
101
|
+
onDeselect: function onDeselect() {
|
|
102
|
+
var _a;
|
|
103
|
+
(_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
104
|
+
},
|
|
99
105
|
onDropdownVisibleChange: onDropdownVisibleChange,
|
|
100
106
|
suffixIcon: react_1["default"].createElement(ArrowDropDownFilled_1["default"], null)
|
|
101
107
|
})), react_1["default"].createElement("label", {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import SplitPane, { SplitPaneProps, Size, Split, SplitPaneState, PaneProps, Pane } from 'react-split-pane';
|
|
3
|
-
export { SplitPaneProps, Size, Split, SplitPaneState, PaneProps, Pane };
|
|
4
|
-
export default SplitPane;
|
|
1
|
+
import React from 'react';
|
|
5
2
|
/** 只做描述 */
|
|
6
|
-
export declare type
|
|
3
|
+
export declare type SplitPaneProps = {
|
|
7
4
|
/**
|
|
8
5
|
* 是否允许拖动
|
|
9
6
|
* @default true
|
|
@@ -56,4 +53,7 @@ export declare type SplitPaneDescProps = {
|
|
|
56
53
|
resizerClassName?: string;
|
|
57
54
|
/** 拖动固定步进值 */
|
|
58
55
|
step?: number;
|
|
56
|
+
children: React.ReactNode;
|
|
59
57
|
};
|
|
58
|
+
declare const SplitPane: React.FC<SplitPaneProps>;
|
|
59
|
+
export default SplitPane;
|
package/lib/split-pane/index.js
CHANGED
|
@@ -1,47 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
get: function get() {
|
|
10
|
-
return m[k];
|
|
3
|
+
var __assign = this && this.__assign || function () {
|
|
4
|
+
__assign = Object.assign || function (t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
11
9
|
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
enumerable: true,
|
|
22
|
-
value: v
|
|
23
|
-
});
|
|
24
|
-
} : function (o, v) {
|
|
25
|
-
o["default"] = v;
|
|
26
|
-
});
|
|
27
|
-
var __importStar = this && this.__importStar || function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k in mod) {
|
|
31
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
-
}
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
return __assign.apply(this, arguments);
|
|
14
|
+
};
|
|
15
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
16
|
+
return mod && mod.__esModule ? mod : {
|
|
17
|
+
"default": mod
|
|
18
|
+
};
|
|
35
19
|
};
|
|
36
20
|
Object.defineProperty(exports, "__esModule", {
|
|
37
21
|
value: true
|
|
38
22
|
});
|
|
39
|
-
|
|
40
|
-
var react_split_pane_1 =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
exports["default"] = react_split_pane_1["default"];
|
|
23
|
+
var react_1 = __importDefault(require("react"));
|
|
24
|
+
var react_split_pane_1 = __importDefault(require("react-split-pane"));
|
|
25
|
+
var SplitPane = function SplitPane(props) {
|
|
26
|
+
return react_1["default"].createElement(react_split_pane_1["default"], __assign({}, props));
|
|
27
|
+
};
|
|
28
|
+
exports["default"] = SplitPane;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.56",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -79,5 +79,6 @@
|
|
|
79
79
|
"engines": {
|
|
80
80
|
"node": ">=10.0.0"
|
|
81
81
|
},
|
|
82
|
-
"license": "MIT"
|
|
82
|
+
"license": "MIT",
|
|
83
|
+
"gitHead": "98bbe97e5631319765af90865680730898aee668"
|
|
83
84
|
}
|