@next-libs/cmdb-instances 6.24.0 → 6.25.0
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/CHANGELOG.md +11 -0
- package/dist/cjs/index.js +52 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/instance-list/InstanceList.js +6 -6
- package/dist/cjs/instance-list/InstanceList.js.map +1 -1
- package/dist/cjs/instance-list-modal/InstanceListModal.js +2 -2
- package/dist/cjs/instance-list-modal/InstanceListModal.js.map +1 -1
- package/dist/cjs/instance-list-table/AdvancedSearch.js +30 -61
- package/dist/cjs/instance-list-table/AdvancedSearch.js.map +1 -1
- package/dist/cjs/processors.js.map +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/instance-list/InstanceList.js +3 -3
- package/dist/esm/instance-list/InstanceList.js.map +1 -1
- package/dist/esm/instance-list-modal/InstanceListModal.js +1 -1
- package/dist/esm/instance-list-modal/InstanceListModal.js.map +1 -1
- package/dist/esm/instance-list-table/AdvancedSearch.js +1 -29
- package/dist/esm/instance-list-table/AdvancedSearch.js.map +1 -1
- package/dist/esm/processors.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/instance-list/InstanceList.d.ts +2 -1
- package/dist/types/instance-list-modal/InstanceListModal.d.ts +1 -1
- package/dist/types/instance-list-table/AdvancedSearch.d.ts +1 -23
- package/dist/types/processors.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [6.25.0](https://github.com/easyops-cn/next-libs/compare/@next-libs/cmdb-instances@6.24.0...@next-libs/cmdb-instances@6.25.0) (2022-05-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* move transformConditionsToAq here ([3b91884](https://github.com/easyops-cn/next-libs/commit/3b91884d43966967eb110f8c16830fbffaa9bfad))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [6.24.0](https://github.com/easyops-cn/next-libs/compare/@next-libs/cmdb-instances@6.23.0...@next-libs/cmdb-instances@6.24.0) (2022-05-20)
|
|
7
18
|
|
|
8
19
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,11 +3,49 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
ComparisonOperators: true,
|
|
8
|
+
ElementOperators: true,
|
|
9
|
+
LogicalOperators: true,
|
|
10
|
+
Query: true,
|
|
11
|
+
QueryOperatorExpressions: true
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "ComparisonOperators", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _cmdbUtils.ComparisonOperators;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "ElementOperators", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _cmdbUtils.ElementOperators;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "LogicalOperators", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _cmdbUtils.LogicalOperators;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "Query", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () {
|
|
34
|
+
return _cmdbUtils.Query;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "QueryOperatorExpressions", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return _cmdbUtils.QueryOperatorExpressions;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
6
43
|
|
|
7
44
|
var _InstanceAttributeForm = require("./instance-attribute-form/InstanceAttributeForm");
|
|
8
45
|
|
|
9
46
|
Object.keys(_InstanceAttributeForm).forEach(function (key) {
|
|
10
47
|
if (key === "default" || key === "__esModule") return;
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
11
49
|
if (key in exports && exports[key] === _InstanceAttributeForm[key]) return;
|
|
12
50
|
Object.defineProperty(exports, key, {
|
|
13
51
|
enumerable: true,
|
|
@@ -21,6 +59,7 @@ var _ModelAttributeForm = require("./model-attribute-form/ModelAttributeForm");
|
|
|
21
59
|
|
|
22
60
|
Object.keys(_ModelAttributeForm).forEach(function (key) {
|
|
23
61
|
if (key === "default" || key === "__esModule") return;
|
|
62
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
24
63
|
if (key in exports && exports[key] === _ModelAttributeForm[key]) return;
|
|
25
64
|
Object.defineProperty(exports, key, {
|
|
26
65
|
enumerable: true,
|
|
@@ -34,6 +73,7 @@ var _ModelRelationForm = require("./model-relation-form/ModelRelationForm");
|
|
|
34
73
|
|
|
35
74
|
Object.keys(_ModelRelationForm).forEach(function (key) {
|
|
36
75
|
if (key === "default" || key === "__esModule") return;
|
|
76
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
37
77
|
if (key in exports && exports[key] === _ModelRelationForm[key]) return;
|
|
38
78
|
Object.defineProperty(exports, key, {
|
|
39
79
|
enumerable: true,
|
|
@@ -47,6 +87,7 @@ var _AttributeFormControlUrl = require("./attribute-form-control-url/AttributeFo
|
|
|
47
87
|
|
|
48
88
|
Object.keys(_AttributeFormControlUrl).forEach(function (key) {
|
|
49
89
|
if (key === "default" || key === "__esModule") return;
|
|
90
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
50
91
|
if (key in exports && exports[key] === _AttributeFormControlUrl[key]) return;
|
|
51
92
|
Object.defineProperty(exports, key, {
|
|
52
93
|
enumerable: true,
|
|
@@ -60,6 +101,7 @@ var _ModelAttributeFormControl = require("./model-attribute-form-control/ModelAt
|
|
|
60
101
|
|
|
61
102
|
Object.keys(_ModelAttributeFormControl).forEach(function (key) {
|
|
62
103
|
if (key === "default" || key === "__esModule") return;
|
|
104
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
63
105
|
if (key in exports && exports[key] === _ModelAttributeFormControl[key]) return;
|
|
64
106
|
Object.defineProperty(exports, key, {
|
|
65
107
|
enumerable: true,
|
|
@@ -73,6 +115,7 @@ var _structComponents = require("./struct-components");
|
|
|
73
115
|
|
|
74
116
|
Object.keys(_structComponents).forEach(function (key) {
|
|
75
117
|
if (key === "default" || key === "__esModule") return;
|
|
118
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
76
119
|
if (key in exports && exports[key] === _structComponents[key]) return;
|
|
77
120
|
Object.defineProperty(exports, key, {
|
|
78
121
|
enumerable: true,
|
|
@@ -86,6 +129,7 @@ var _instanceListTable = require("./instance-list-table");
|
|
|
86
129
|
|
|
87
130
|
Object.keys(_instanceListTable).forEach(function (key) {
|
|
88
131
|
if (key === "default" || key === "__esModule") return;
|
|
132
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
89
133
|
if (key in exports && exports[key] === _instanceListTable[key]) return;
|
|
90
134
|
Object.defineProperty(exports, key, {
|
|
91
135
|
enumerable: true,
|
|
@@ -99,6 +143,7 @@ var _InstanceListModal = require("./instance-list-modal/InstanceListModal");
|
|
|
99
143
|
|
|
100
144
|
Object.keys(_InstanceListModal).forEach(function (key) {
|
|
101
145
|
if (key === "default" || key === "__esModule") return;
|
|
146
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
102
147
|
if (key in exports && exports[key] === _InstanceListModal[key]) return;
|
|
103
148
|
Object.defineProperty(exports, key, {
|
|
104
149
|
enumerable: true,
|
|
@@ -112,6 +157,7 @@ var _InstanceList = require("./instance-list/InstanceList");
|
|
|
112
157
|
|
|
113
158
|
Object.keys(_InstanceList).forEach(function (key) {
|
|
114
159
|
if (key === "default" || key === "__esModule") return;
|
|
160
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
115
161
|
if (key in exports && exports[key] === _InstanceList[key]) return;
|
|
116
162
|
Object.defineProperty(exports, key, {
|
|
117
163
|
enumerable: true,
|
|
@@ -125,6 +171,7 @@ var _CmdbInstancesInputFormItem = require("./cmdb-instances-input-form/CmdbInsta
|
|
|
125
171
|
|
|
126
172
|
Object.keys(_CmdbInstancesInputFormItem).forEach(function (key) {
|
|
127
173
|
if (key === "default" || key === "__esModule") return;
|
|
174
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
128
175
|
if (key in exports && exports[key] === _CmdbInstancesInputFormItem[key]) return;
|
|
129
176
|
Object.defineProperty(exports, key, {
|
|
130
177
|
enumerable: true,
|
|
@@ -138,6 +185,7 @@ var _CmdbInstancesSelectPanel = require("./cmdb-instances-select-panel/CmdbInsta
|
|
|
138
185
|
|
|
139
186
|
Object.keys(_CmdbInstancesSelectPanel).forEach(function (key) {
|
|
140
187
|
if (key === "default" || key === "__esModule") return;
|
|
188
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
141
189
|
if (key in exports && exports[key] === _CmdbInstancesSelectPanel[key]) return;
|
|
142
190
|
Object.defineProperty(exports, key, {
|
|
143
191
|
enumerable: true,
|
|
@@ -151,6 +199,7 @@ var _InstanceDetail = require("./instance-detail/InstanceDetail");
|
|
|
151
199
|
|
|
152
200
|
Object.keys(_InstanceDetail).forEach(function (key) {
|
|
153
201
|
if (key === "default" || key === "__esModule") return;
|
|
202
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
154
203
|
if (key in exports && exports[key] === _InstanceDetail[key]) return;
|
|
155
204
|
Object.defineProperty(exports, key, {
|
|
156
205
|
enumerable: true,
|
|
@@ -164,6 +213,7 @@ var _FloatDisplayBrick = require("./float-display-brick/FloatDisplayBrick");
|
|
|
164
213
|
|
|
165
214
|
Object.keys(_FloatDisplayBrick).forEach(function (key) {
|
|
166
215
|
if (key === "default" || key === "__esModule") return;
|
|
216
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
167
217
|
if (key in exports && exports[key] === _FloatDisplayBrick[key]) return;
|
|
168
218
|
Object.defineProperty(exports, key, {
|
|
169
219
|
enumerable: true,
|
|
@@ -172,4 +222,6 @@ Object.keys(_FloatDisplayBrick).forEach(function (key) {
|
|
|
172
222
|
}
|
|
173
223
|
});
|
|
174
224
|
});
|
|
225
|
+
|
|
226
|
+
var _cmdbUtils = require("@next-libs/cmdb-utils");
|
|
175
227
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA","sourcesContent":["export * from \"./instance-attribute-form/InstanceAttributeForm\";\nexport * from \"./model-attribute-form/ModelAttributeForm\";\nexport * from \"./model-relation-form/ModelRelationForm\";\nexport * from \"./attribute-form-control-url/AttributeFormControlUrl\";\nexport * from \"./model-attribute-form-control/ModelAttributeFormControl\";\nexport * from \"./struct-components\";\nexport * from \"./instance-list-table\";\nexport * from \"./instance-list-modal/InstanceListModal\";\nexport * from \"./instance-list/InstanceList\";\nexport * from \"./cmdb-instances-input-form/CmdbInstancesInputFormItem\";\nexport * from \"./cmdb-instances-select-panel/CmdbInstancesSelectPanel\";\nexport * from \"./instance-detail/InstanceDetail\";\nexport * from \"./float-display-brick/FloatDisplayBrick\";\n// For compatibility\nexport {\n ComparisonOperators,\n ElementOperators,\n LogicalOperators,\n Query,\n QueryOperatorExpressions,\n} from \"@next-libs/cmdb-utils\";\n"],"file":"index.js"}
|
|
@@ -31,14 +31,14 @@ var _antd = require("antd");
|
|
|
31
31
|
|
|
32
32
|
var _cmdbUtils = require("@next-libs/cmdb-utils");
|
|
33
33
|
|
|
34
|
+
var _storage = require("@next-libs/storage");
|
|
35
|
+
|
|
34
36
|
var _instanceListTable = require("../instance-list-table");
|
|
35
37
|
|
|
36
38
|
var _InstanceListModule = _interopRequireDefault(require("./InstanceList.module.css"));
|
|
37
39
|
|
|
38
40
|
var _constants2 = require("./constants");
|
|
39
41
|
|
|
40
|
-
var _storage = require("@next-libs/storage");
|
|
41
|
-
|
|
42
42
|
var _ModelAttributeFormControl = require("../model-attribute-form-control/ModelAttributeFormControl");
|
|
43
43
|
|
|
44
44
|
var _IconButton = require("./IconButton");
|
|
@@ -144,7 +144,7 @@ function translateConditions(aq, idObjectMap, modelData, t) {
|
|
|
144
144
|
const value = Object.values(query)[0];
|
|
145
145
|
let attr = attrAndRelationList.find(attr => attr.id === key || attr.relationSideId === key);
|
|
146
146
|
|
|
147
|
-
if (Object.keys(value)[0] ===
|
|
147
|
+
if (Object.keys(value)[0] === _cmdbUtils.ElementOperators.Exists && attr.relationSideId) {
|
|
148
148
|
const relationSideId = attr.relationSideId;
|
|
149
149
|
attr = attrAndRelationList.find(attr => attr.id === `${relationSideId}.`) || attr;
|
|
150
150
|
}
|
|
@@ -222,7 +222,7 @@ const initAqToShow = (aq, modelData, isToShow = true) => {
|
|
|
222
222
|
const aqToShow = Object.entries(query).map(([key, expressions]) => {
|
|
223
223
|
let newExpressions = [];
|
|
224
224
|
|
|
225
|
-
if (key ===
|
|
225
|
+
if (key === _cmdbUtils.LogicalOperators.Or || key === _cmdbUtils.LogicalOperators.And) {
|
|
226
226
|
const firstSubQuery = expressions[0];
|
|
227
227
|
const fieldId = Object.keys(firstSubQuery)[0];
|
|
228
228
|
const isStruct = isOfStruct(modelData, fieldId);
|
|
@@ -453,11 +453,11 @@ function InstanceList(props) {
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
if (!(0, _lodash.isEmpty)(state.aq)) {
|
|
456
|
-
query[
|
|
456
|
+
query[_cmdbUtils.LogicalOperators.And] = state.aq;
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
if (!(0, _lodash.isEmpty)(props.defaultQuery)) {
|
|
460
|
-
query[
|
|
460
|
+
query[_cmdbUtils.LogicalOperators.And] = [...(query[_cmdbUtils.LogicalOperators.And] || []), ...props.defaultQuery];
|
|
461
461
|
}
|
|
462
462
|
|
|
463
463
|
if (props.presetConfigs) {
|