semanticdb-core 1.0.16 → 1.0.17
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/README.md +1 -1
- package/dist/custom-function/utils.d.ts +8 -0
- package/dist/custom-function/utils.js +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
### Logicform 相关
|
|
20
20
|
|
|
21
|
-
- `isDimensionInQuery`: 判断维度是否在 Query
|
|
21
|
+
- `isDimensionInQuery`: 判断维度是否在 Query 中使用。 (logicform, dimensionString, strictMode)
|
|
22
22
|
- `getFlattenQuery`: 将嵌套的查询对象扁平化(如 `{ customer: { query: { name: '张三' } } }` 转换为 `{ 'customer_name': '张三' }`)
|
|
23
23
|
|
|
24
24
|
## 安装
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 从customFunctions里面拿到正确的函数,兼容老版本(纯name版本)。新版本需要schemaID
|
|
3
|
+
* @param schemaID
|
|
4
|
+
* @param operator
|
|
5
|
+
* @param customFunctions
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const findOneCustomFunction: (schemaID: string, operator: string, customFunctions: Record<string, any>) => any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findOneCustomFunction = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 从customFunctions里面拿到正确的函数,兼容老版本(纯name版本)。新版本需要schemaID
|
|
6
|
+
* @param schemaID
|
|
7
|
+
* @param operator
|
|
8
|
+
* @param customFunctions
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
const findOneCustomFunction = (schemaID, operator, customFunctions) => {
|
|
12
|
+
let func = customFunctions[operator];
|
|
13
|
+
if (!func)
|
|
14
|
+
func = customFunctions[`${schemaID}_${operator}`];
|
|
15
|
+
return func;
|
|
16
|
+
};
|
|
17
|
+
exports.findOneCustomFunction = findOneCustomFunction;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -24,3 +24,4 @@ var getDrilldownDimensions_1 = require("./schema/schema.utils/getDrilldownDimens
|
|
|
24
24
|
Object.defineProperty(exports, "getDrilldownDimensions", { enumerable: true, get: function () { return getDrilldownDimensions_1.getDrilldownDimensions; } });
|
|
25
25
|
__exportStar(require("./logicform/logicform"), exports);
|
|
26
26
|
__exportStar(require("./logicform/logicform.utils"), exports);
|
|
27
|
+
__exportStar(require("./custom-function/utils"), exports);
|