@lcap/asl
Version:
NetEase Application Specific Language
137 lines (136 loc) • 3.72 kB
TypeScript
import { Entity, EntityProperty, View, LEVEL_ENUM } from '../..';
import { NameGroup } from '.';
/**
* 根据实体属性生成表格列模板
* @param property 实体属性
*/
export declare function genTableColumnTemplate(property: EntityProperty): string;
/**
* 生成表格模板
* @param entity 实体
* @param nameGroup 命名组
*/
export declare function genTableTemplate(entity: Entity, nameGroup: NameGroup): string;
/**
* 生成表格 load 逻辑
* @param entity 实体
*/
export declare function genTableLoadLogic(entity: Entity, nameGroup: NameGroup, newStructures: Array<any>, newInterfaces: Array<any>, supportFilter: boolean): {
level: string;
name: string;
params: {
level: string;
type: string;
name: string;
schema: {
$ref: string;
};
}[];
returns: {
level: LEVEL_ENUM;
type: string;
name: string;
schema: import("../Schema").Schema;
}[];
variables: any[];
body: ({
level: string;
type: string;
label: string;
operator?: undefined;
left?: undefined;
right?: undefined;
} | {
level: string;
type: string;
label: string;
operator: string;
left: {
level: string;
type: string;
name: string;
};
right: {
level: string;
type: string;
label: string;
callee: any;
calleeCode: string;
params: Partial<import("../..").LogicItem>[];
interfaceKey?: undefined;
} | {
level: string;
type: string;
label: string;
interfaceKey: any;
params: Partial<import("../..").LogicItem>[];
callee?: undefined;
calleeCode?: undefined;
};
})[];
};
/**
* 生成表格 remove 逻辑
* @param entity 实体
*/
export declare function genTableRemoveLogic(entity: Entity, nameGroup: NameGroup): {
level: string;
name: string;
params: ({
level: string;
type: string;
name: string;
schema: {
$ref: string;
};
} | {
level: string;
name: string;
schema: import("../Schema").Schema;
type?: undefined;
})[];
returns: any[];
variables: any[];
body: ({
level: string;
type: string;
label: string;
callee: string;
calleeCode: string;
params: {
level: string;
type: string;
callInterParamValue: any;
name: string;
}[];
} | {
level: string;
type: string;
label: string;
interfaceKey: string;
params: Partial<import("../..").LogicItem>[];
} | {
level: string;
type: string;
label: string;
callee: string;
calleeCode: string;
params: Partial<import("../..").LogicItem>[];
} | {
level: string;
type: string;
label: string;
})[];
};
/**
* 生成表格区块
* @param entity 实体
* @param view 所插入的页面,用于生成逻辑名字,去重等
* @notice 目前 logic 名去重做成前置处理了,与 mergeBlock 的后置处理不冲突
* (页面 load 名) -产生-> (interface 名) -产生-> (structure 名)
* load -> load_someView_tableView
* load_select_student -> load_someView_select_student
*/
export declare function genTableBlock(entity: Entity, view: View): string;
export declare function genTableColumnBlock(property: EntityProperty, view: View): string;
export default genTableBlock;