@kmkf-fe-packages/kmkf-utils 0.7.12-alpha.0 → 0.7.12-alpha.5
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/esm/utils/index.d.ts +0 -2
- package/dist/esm/utils/index.js +0 -2
- package/dist/esm/utils/orderBackFormValues.js +1 -0
- package/package.json +2 -2
- package/dist/esm/utils/formatDisplayConfig.d.ts +0 -11
- package/dist/esm/utils/formatDisplayConfig.js +0 -24
- package/dist/esm/utils/getExpression.d.ts +0 -2
- package/dist/esm/utils/getExpression.js +0 -38
|
@@ -3,8 +3,6 @@ export { default as findLabelBySelectValue } from './findLabelBySelectValue';
|
|
|
3
3
|
export { default as transMultSelectOptions } from './transMultSelectOptions';
|
|
4
4
|
export { default as imgResize } from './imgResize';
|
|
5
5
|
export { default as isNull } from './isNull';
|
|
6
|
-
export { default as getExpression } from './getExpression';
|
|
7
|
-
export { default as formatDisplayConfig } from './formatDisplayConfig';
|
|
8
6
|
export { default as orderBackFormValues } from './orderBackFormValues';
|
|
9
7
|
export * as filterFn from './filterFn';
|
|
10
8
|
export * as templateFn from './template';
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -3,8 +3,6 @@ export { default as findLabelBySelectValue } from "./findLabelBySelectValue";
|
|
|
3
3
|
export { default as transMultSelectOptions } from "./transMultSelectOptions";
|
|
4
4
|
export { default as imgResize } from "./imgResize";
|
|
5
5
|
export { default as isNull } from "./isNull";
|
|
6
|
-
export { default as getExpression } from "./getExpression";
|
|
7
|
-
export { default as formatDisplayConfig } from "./formatDisplayConfig";
|
|
8
6
|
export { default as orderBackFormValues } from "./orderBackFormValues";
|
|
9
7
|
import * as _filterFn from "./filterFn";
|
|
10
8
|
export { _filterFn as filterFn };
|
|
@@ -204,6 +204,7 @@ export default (function (_ref) {
|
|
|
204
204
|
case "ITEM_SELECT":
|
|
205
205
|
case "ITEM_ID":
|
|
206
206
|
case "ITEM_ENCODE":
|
|
207
|
+
case "ITEM_SELECT_THIRD":
|
|
207
208
|
prv[uniqueKey] = taobaoGoodHandle(detail["itemList"], next.workOrderComponentType, next.componentConfig);
|
|
208
209
|
break;
|
|
209
210
|
case "REMARK_INPUT":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-utils",
|
|
3
|
-
"version": "0.7.12-alpha.
|
|
3
|
+
"version": "0.7.12-alpha.5",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"gitHooks": {
|
|
43
43
|
"pre-commit": "lint-staged"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "b9d59b5135e03e0f1b3e503a20da1590c1159047"
|
|
46
46
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare type ConfigType = {
|
|
2
|
-
linkCondition: "every" | "some";
|
|
3
|
-
conditionList: Array<{
|
|
4
|
-
leftValue: string;
|
|
5
|
-
compareSymbol: string;
|
|
6
|
-
rightValue: any;
|
|
7
|
-
}>;
|
|
8
|
-
displayComponentList: Array<string>;
|
|
9
|
-
};
|
|
10
|
-
declare const formatDisplayConfig: (p: Array<ConfigType>) => any;
|
|
11
|
-
export default formatDisplayConfig;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var formatDisplayConfig = function formatDisplayConfig(p) {
|
|
2
|
-
return p.reduce(function (cur, nxt) {
|
|
3
|
-
var _nxt$displayComponent;
|
|
4
|
-
if (((_nxt$displayComponent = nxt.displayComponentList) === null || _nxt$displayComponent === void 0 ? void 0 : _nxt$displayComponent.length) > 0) {
|
|
5
|
-
nxt.displayComponentList.map(function (item) {
|
|
6
|
-
var linkCondition = nxt.linkCondition,
|
|
7
|
-
conditionList = nxt.conditionList;
|
|
8
|
-
if (!Reflect.has(cur, item)) {
|
|
9
|
-
cur[item] = [{
|
|
10
|
-
linkCondition: linkCondition,
|
|
11
|
-
conditionList: conditionList
|
|
12
|
-
}];
|
|
13
|
-
} else if (Array.isArray(cur[item])) {
|
|
14
|
-
cur[item].push({
|
|
15
|
-
linkCondition: linkCondition,
|
|
16
|
-
conditionList: conditionList
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return cur;
|
|
22
|
-
}, {});
|
|
23
|
-
};
|
|
24
|
-
export default formatDisplayConfig;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
2
|
-
var getExpression = function getExpression(condition, l, r) {
|
|
3
|
-
if (condition === 'EQ') {
|
|
4
|
-
return l === r;
|
|
5
|
-
}
|
|
6
|
-
if (condition === 'GT') {
|
|
7
|
-
return l > r;
|
|
8
|
-
}
|
|
9
|
-
if (condition === 'GTE') {
|
|
10
|
-
return l >= r;
|
|
11
|
-
}
|
|
12
|
-
if (condition === 'LT') {
|
|
13
|
-
return l < r;
|
|
14
|
-
}
|
|
15
|
-
if (condition === 'LTE') {
|
|
16
|
-
return l <= r;
|
|
17
|
-
}
|
|
18
|
-
if (condition === 'IN') {
|
|
19
|
-
return l === null || l === void 0 ? void 0 : l.includes(r);
|
|
20
|
-
}
|
|
21
|
-
if (condition === 'NE') {
|
|
22
|
-
return l !== r;
|
|
23
|
-
}
|
|
24
|
-
if (condition === 'LIKE') {
|
|
25
|
-
return l === null || l === void 0 ? void 0 : l.includes(r);
|
|
26
|
-
}
|
|
27
|
-
if (condition === 'NIN') {
|
|
28
|
-
return !(l !== null && l !== void 0 && l.includes(r));
|
|
29
|
-
}
|
|
30
|
-
if (condition === 'NON') {
|
|
31
|
-
return isNull(l);
|
|
32
|
-
}
|
|
33
|
-
if (condition === 'NOTNULL') {
|
|
34
|
-
return !isNull(l);
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
37
|
-
};
|
|
38
|
-
export default getExpression;
|