semanticdb-core 1.0.44 → 1.0.46
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/result/index.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export interface LogicformResultType {
|
|
|
8
8
|
schemas: Record<string, SchemaType>;
|
|
9
9
|
columnProperties: PropertyType[];
|
|
10
10
|
}
|
|
11
|
-
export declare const logicformResultToMarkdown: (ret: LogicformResultType) => string;
|
|
11
|
+
export declare const logicformResultToMarkdown: (ret: LogicformResultType, number_only?: boolean) => string;
|
package/dist/result/index.js
CHANGED
|
@@ -6,15 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.logicformResultToMarkdown = void 0;
|
|
7
7
|
const json2md_1 = __importDefault(require("json2md"));
|
|
8
8
|
const property_utils_1 = require("../schema/property.utils");
|
|
9
|
-
const logicformResultToMarkdown = (ret) => {
|
|
9
|
+
const logicformResultToMarkdown = (ret, number_only) => {
|
|
10
10
|
const { schemas, result, logicform, columnProperties } = ret;
|
|
11
11
|
if (result.length === 0)
|
|
12
12
|
return '没有数据';
|
|
13
13
|
let markdownText = '';
|
|
14
14
|
if (!logicform.groupby) {
|
|
15
15
|
markdownText = columnProperties
|
|
16
|
-
.map((p) => p.name +
|
|
17
|
-
': ' +
|
|
16
|
+
.map((p) => (number_only ? '' : (p.name + ': ')) +
|
|
18
17
|
(0, property_utils_1.formatWithProperty)(p.ref ? schemas[p.ref] : schemas[logicform.schema], p, result[0][p.name], true))
|
|
19
18
|
.join(',');
|
|
20
19
|
}
|
|
@@ -56,7 +56,7 @@ exports.findPropertyByName = findPropertyByName;
|
|
|
56
56
|
* @returns The property marked as display name (is_name=true or ui.name=true) or undefined if not found
|
|
57
57
|
*/
|
|
58
58
|
const findDisplayNameProperty = (schema) => {
|
|
59
|
-
let nameProp = schema.properties.find((p) => p.is_name || p.ui.name);
|
|
59
|
+
let nameProp = schema.properties.find((p) => { var _a; return p.is_name || ((_a = p.ui) === null || _a === void 0 ? void 0 : _a.name); });
|
|
60
60
|
if (nameProp)
|
|
61
61
|
return nameProp;
|
|
62
62
|
nameProp = schema.properties.find((p) => p.type === 'ID');
|