@alicloud/console-components-search 0.2.5 → 0.2.6
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
开始构建微应用external依赖...
|
|
2
2
|
BreezrPluginStyledComponentsIsolation The plugin will trying to use the package's name as isolation id of styled-components. This behavior usually occurred on dev mode. And if you were received this warning on publish mode then you should to set `options.styledComponentStyleSheetId` implicitly.
|
|
3
3
|
ℹ Compiling Webpack
|
|
4
|
-
✔ Webpack: Compiled successfully in
|
|
4
|
+
✔ Webpack: Compiled successfully in 13.67s
|
|
5
5
|
WARN asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
|
|
6
6
|
This can impact web performance.
|
|
7
7
|
Assets:
|
|
8
|
-
main.js (2.
|
|
8
|
+
main.js (2.51 MiB),entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
|
|
9
9
|
Entrypoints:
|
|
10
|
-
main (2.
|
|
10
|
+
main (2.51 MiB)
|
|
11
11
|
main.css
|
|
12
12
|
main.js
|
|
13
13
|
,webpack performance recommendations:
|
|
@@ -19,7 +19,7 @@ var TagGroup = Tag.Group,
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
var isTagLikeDataStructure = function isTagLikeDataStructure(value) {
|
|
22
|
-
var isTag = !!value.tagKey;
|
|
22
|
+
var isTag = !!(value !== null && value !== void 0 && value.tagKey);
|
|
23
23
|
|
|
24
24
|
if (isArray(value)) {
|
|
25
25
|
return value[0] && !!value[0].tagKey;
|
|
@@ -63,9 +63,14 @@ var SearchTagList = function SearchTagList(props) {
|
|
|
63
63
|
return x.tagKey === tag.tagKey && x.tagValue === tag.tagValue;
|
|
64
64
|
});
|
|
65
65
|
var deletedTags = item.value.splice(resFindIndex, 1);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
|
|
67
|
+
if (item.value.length === 0) {
|
|
68
|
+
onRemoveFilter(item);
|
|
69
|
+
} else {
|
|
70
|
+
onChange(_objectSpread(_objectSpread({}, item), {}, {
|
|
71
|
+
value: deletedTags
|
|
72
|
+
}), newDataSource);
|
|
73
|
+
}
|
|
69
74
|
}
|
|
70
75
|
};
|
|
71
76
|
|
|
@@ -76,9 +81,9 @@ var SearchTagList = function SearchTagList(props) {
|
|
|
76
81
|
return value.map(function (t) {
|
|
77
82
|
return /*#__PURE__*/React.createElement(PureTag, {
|
|
78
83
|
showLabel: true,
|
|
79
|
-
key: "".concat(t.tagKey, "-").concat(t.tagValue),
|
|
80
|
-
tagKey: t.tagKey,
|
|
81
|
-
tagValue: t.tagValue,
|
|
84
|
+
key: "".concat(t === null || t === void 0 ? void 0 : t.tagKey, "-").concat(t === null || t === void 0 ? void 0 : t.tagValue),
|
|
85
|
+
tagKey: t === null || t === void 0 ? void 0 : t.tagKey,
|
|
86
|
+
tagValue: t === null || t === void 0 ? void 0 : t.tagValue,
|
|
82
87
|
closable: true,
|
|
83
88
|
onClose: function onClose() {
|
|
84
89
|
onRemoveTag(tagItem, t);
|
|
@@ -90,8 +95,8 @@ var SearchTagList = function SearchTagList(props) {
|
|
|
90
95
|
|
|
91
96
|
return /*#__PURE__*/React.createElement(PureTag, {
|
|
92
97
|
showLabel: true,
|
|
93
|
-
tagKey: value.tagKey,
|
|
94
|
-
tagValue: value.tagValue,
|
|
98
|
+
tagKey: value === null || value === void 0 ? void 0 : value.tagKey,
|
|
99
|
+
tagValue: value === null || value === void 0 ? void 0 : value.tagValue,
|
|
95
100
|
closable: true,
|
|
96
101
|
onClose: function onClose() {
|
|
97
102
|
onRemoveFilter(tagItem);
|
|
@@ -36,7 +36,7 @@ var TagGroup = _consoleComponents.Tag.Group,
|
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
var isTagLikeDataStructure = function isTagLikeDataStructure(value) {
|
|
39
|
-
var isTag = !!value.tagKey;
|
|
39
|
+
var isTag = !!(value !== null && value !== void 0 && value.tagKey);
|
|
40
40
|
|
|
41
41
|
if ((0, _isArray.default)(value)) {
|
|
42
42
|
return value[0] && !!value[0].tagKey;
|
|
@@ -80,9 +80,14 @@ var SearchTagList = function SearchTagList(props) {
|
|
|
80
80
|
return x.tagKey === tag.tagKey && x.tagValue === tag.tagValue;
|
|
81
81
|
});
|
|
82
82
|
var deletedTags = item.value.splice(resFindIndex, 1);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
|
|
84
|
+
if (item.value.length === 0) {
|
|
85
|
+
onRemoveFilter(item);
|
|
86
|
+
} else {
|
|
87
|
+
onChange(_objectSpread(_objectSpread({}, item), {}, {
|
|
88
|
+
value: deletedTags
|
|
89
|
+
}), newDataSource);
|
|
90
|
+
}
|
|
86
91
|
}
|
|
87
92
|
};
|
|
88
93
|
|
|
@@ -93,9 +98,9 @@ var SearchTagList = function SearchTagList(props) {
|
|
|
93
98
|
return value.map(function (t) {
|
|
94
99
|
return /*#__PURE__*/_react.default.createElement(_PureTag.default, {
|
|
95
100
|
showLabel: true,
|
|
96
|
-
key: "".concat(t.tagKey, "-").concat(t.tagValue),
|
|
97
|
-
tagKey: t.tagKey,
|
|
98
|
-
tagValue: t.tagValue,
|
|
101
|
+
key: "".concat(t === null || t === void 0 ? void 0 : t.tagKey, "-").concat(t === null || t === void 0 ? void 0 : t.tagValue),
|
|
102
|
+
tagKey: t === null || t === void 0 ? void 0 : t.tagKey,
|
|
103
|
+
tagValue: t === null || t === void 0 ? void 0 : t.tagValue,
|
|
99
104
|
closable: true,
|
|
100
105
|
onClose: function onClose() {
|
|
101
106
|
onRemoveTag(tagItem, t);
|
|
@@ -107,8 +112,8 @@ var SearchTagList = function SearchTagList(props) {
|
|
|
107
112
|
|
|
108
113
|
return /*#__PURE__*/_react.default.createElement(_PureTag.default, {
|
|
109
114
|
showLabel: true,
|
|
110
|
-
tagKey: value.tagKey,
|
|
111
|
-
tagValue: value.tagValue,
|
|
115
|
+
tagKey: value === null || value === void 0 ? void 0 : value.tagKey,
|
|
116
|
+
tagValue: value === null || value === void 0 ? void 0 : value.tagValue,
|
|
112
117
|
closable: true,
|
|
113
118
|
onClose: function onClose() {
|
|
114
119
|
onRemoveFilter(tagItem);
|