semanticdb-core 1.1.9 → 1.1.11
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.
|
@@ -209,16 +209,14 @@ const propertyForPredItem = (predItem, s, ctx) => {
|
|
|
209
209
|
// 递归处理componentProperties
|
|
210
210
|
if (targetProperty.components) {
|
|
211
211
|
targetProperty.componentProperties = targetProperty.components.map((c) => {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
c.name = (0, nameForPredItem_1.nameForPredItem)(c, schema, ctx);
|
|
215
|
-
}
|
|
216
|
-
return (0, exports.propertyForPredItem)(c, schema, ctx);
|
|
212
|
+
if (!c.name) {
|
|
213
|
+
c.name = (0, nameForPredItem_1.nameForPredItem)(c, schema, ctx);
|
|
217
214
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
215
|
+
const property = (0, exports.propertyForPredItem)(c, schema, ctx);
|
|
216
|
+
if (!property) {
|
|
217
|
+
throw new Error(`生成property失败:${JSON.stringify(c)}`);
|
|
221
218
|
}
|
|
219
|
+
return property;
|
|
222
220
|
});
|
|
223
221
|
}
|
|
224
222
|
// 清理不需要的字段
|
package/dist/result/index.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ export interface LogicformResultType {
|
|
|
7
7
|
logicform?: LogicformType;
|
|
8
8
|
schemas?: Record<string, SchemaType>;
|
|
9
9
|
columnProperties?: PropertyType[];
|
|
10
|
+
sqls?: string[];
|
|
10
11
|
}
|
|
11
12
|
export declare const logicformResultToMarkdown: (ret: LogicformResultType, number_only?: boolean) => string;
|
package/dist/result/index.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.logicformResultToMarkdown = void 0;
|
|
|
7
7
|
const json2md_1 = __importDefault(require("json2md"));
|
|
8
8
|
const property_utils_1 = require("../schema/property.utils");
|
|
9
9
|
const logicformResultToMarkdown = (ret, number_only) => {
|
|
10
|
-
const { schemas, result, logicform, columnProperties } = ret;
|
|
10
|
+
const { schemas, result, logicform, columnProperties, sqls } = ret;
|
|
11
11
|
if (!result || !logicform || !columnProperties || !schemas)
|
|
12
12
|
return '没有数据';
|
|
13
13
|
if (result.length === 0)
|
|
@@ -70,6 +70,8 @@ export interface PropertyTypeDraft {
|
|
|
70
70
|
copyable?: boolean;
|
|
71
71
|
};
|
|
72
72
|
can_drilldown?: boolean;
|
|
73
|
+
components?: any[];
|
|
74
|
+
componentProperties?: PropertyType[];
|
|
73
75
|
unit?: string;
|
|
74
76
|
level?: string;
|
|
75
77
|
versioned?: boolean;
|
|
@@ -78,7 +80,6 @@ export interface PropertyTypeDraft {
|
|
|
78
80
|
drilldown?: any[];
|
|
79
81
|
};
|
|
80
82
|
recommend_kpis?: any[];
|
|
81
|
-
components?: any[];
|
|
82
83
|
quantifier?: string;
|
|
83
84
|
quantifiers?: Record<string, number>;
|
|
84
85
|
}
|
package/dist/schema/schema.d.ts
CHANGED