@dckj-npm/lowcode-code-generator 1.2.23 → 1.2.24
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/CHANGELOG.md +280 -280
- package/CONTRIBUTING.md +40 -40
- package/README.md +123 -123
- package/bin/lowcode-code-generator.js +53 -53
- package/dist/cli.js.map +1 -1
- package/dist/standalone-loader.esm.js +1 -1
- package/dist/standalone-loader.esm.js.map +1 -1
- package/dist/standalone-loader.js +1 -1
- package/dist/standalone-loader.js.map +1 -1
- package/dist/standalone-worker.js.map +1 -1
- package/dist/standalone.js.map +1 -1
- package/es/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +156 -156
- package/standalone/index.js +6 -6
- package/standalone/package.json +5 -5
- package/standalone-loader/index.js +2 -2
- package/standalone-loader/package.json +6 -6
- package/standalone-worker/index.js +6 -6
- package/standalone-worker/package.json +5 -5
- package/types/analyzer/componentAnalyzer.d.ts +2 -2
- package/types/cli/index.d.ts +2 -2
- package/types/cli/init-solution.d.ts +4 -4
- package/types/cli/run.d.ts +15 -15
- package/types/cli/solutions/example-solution.d.ts +4 -4
- package/types/config/env.d.ts +1 -1
- package/types/const/file.d.ts +2 -2
- package/types/const/generator.d.ts +58 -58
- package/types/const/index.d.ts +11 -11
- package/types/core/jsx/handlers/transformJsExpression.d.ts +5 -5
- package/types/core/jsx/handlers/transformThis2Context.d.ts +9 -9
- package/types/core/jsx/util/isLiteralAtomicExpr.d.ts +4 -4
- package/types/core/jsx/util/isSimpleStraightLiteral.d.ts +3 -3
- package/types/core/vue/handlers/transformJsExpression.d.ts +5 -5
- package/types/core/vue/handlers/transformThis2Context.d.ts +9 -9
- package/types/core/vue/util/isLiteralAtomicExpr.d.ts +4 -4
- package/types/core/vue/util/isSimpleStraightLiteral.d.ts +3 -3
- package/types/generator/ChunkBuilder.d.ts +23 -23
- package/types/generator/CodeBuilder.d.ts +17 -17
- package/types/generator/ModuleBuilder.d.ts +7 -7
- package/types/generator/ProjectBuilder.d.ts +62 -62
- package/types/index.d.ts +260 -260
- package/types/parser/SchemaParser.d.ts +25 -25
- package/types/plugins/common/esmodule.d.ts +8 -8
- package/types/plugins/common/requireUtils.d.ts +3 -3
- package/types/plugins/common/styleImport.d.ts +3 -3
- package/types/plugins/component/rax/commonDeps.d.ts +3 -3
- package/types/plugins/component/rax/const.d.ts +18 -18
- package/types/plugins/component/rax/containerClass.d.ts +3 -3
- package/types/plugins/component/rax/containerInitState.d.ts +7 -7
- package/types/plugins/component/rax/containerInjectContext.d.ts +6 -6
- package/types/plugins/component/rax/containerInjectDataSourceEngine.d.ts +12 -12
- package/types/plugins/component/rax/containerInjectUtils.d.ts +6 -6
- package/types/plugins/component/rax/containerLifeCycle.d.ts +8 -8
- package/types/plugins/component/rax/containerMethods.d.ts +6 -6
- package/types/plugins/component/rax/jsx.d.ts +8 -8
- package/types/plugins/component/react/const.d.ts +9 -9
- package/types/plugins/component/react/containerClass.d.ts +3 -3
- package/types/plugins/component/react/containerInitState.d.ts +7 -7
- package/types/plugins/component/react/containerInjectConstants.d.ts +6 -6
- package/types/plugins/component/react/containerInjectContext.d.ts +6 -6
- package/types/plugins/component/react/containerInjectDataSourceEngine.d.ts +23 -23
- package/types/plugins/component/react/containerInjectI18n.d.ts +6 -6
- package/types/plugins/component/react/containerInjectUtils.d.ts +8 -8
- package/types/plugins/component/react/containerLifeCycle.d.ts +9 -9
- package/types/plugins/component/react/containerMethod.d.ts +6 -6
- package/types/plugins/component/react/jsx.d.ts +7 -7
- package/types/plugins/component/react/reactCommonDeps.d.ts +3 -3
- package/types/plugins/component/style/css.d.ts +7 -7
- package/types/plugins/component/vue/apiImport.d.ts +23 -23
- package/types/plugins/component/vue/containerInitVariable.d.ts +7 -7
- package/types/plugins/component/vue/containerInjectDataSourceEngine.d.ts +23 -23
- package/types/plugins/component/vue/containerLifeCycle.d.ts +9 -9
- package/types/plugins/component/vue/containerMethod.d.ts +6 -6
- package/types/plugins/component/vue/containerVue.d.ts +3 -3
- package/types/plugins/component/vue/convert/convert-function.d.ts +6 -6
- package/types/plugins/component/vue/convert/convert-variable.d.ts +11 -11
- package/types/plugins/component/vue/dataSourceMap.d.ts +7 -7
- package/types/plugins/component/vue/esmodule.d.ts +8 -8
- package/types/plugins/component/vue/routerSecond.d.ts +3 -3
- package/types/plugins/component/vue/template.d.ts +7 -7
- package/types/plugins/component/vue/vueCommonDeps.d.ts +3 -3
- package/types/plugins/project/constants.d.ts +3 -3
- package/types/plugins/project/framework/icejs/index.d.ts +11 -11
- package/types/plugins/project/framework/icejs/plugins/entry.d.ts +3 -3
- package/types/plugins/project/framework/icejs/plugins/entryHtml.d.ts +3 -3
- package/types/plugins/project/framework/icejs/plugins/globalStyle.d.ts +3 -3
- package/types/plugins/project/framework/icejs/plugins/packageJSON.d.ts +26 -26
- package/types/plugins/project/framework/icejs/plugins/router.d.ts +3 -3
- package/types/plugins/project/framework/icejs/template/files/README.md.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/abc.json.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/build.json.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/editorconfig.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/eslintignore.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/eslintrc.js.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/gitignore.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/jsconfig.json.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/prettierignore.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/prettierrc.js.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/src/layouts/BasicLayout/components/Footer/index.jsx.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/src/layouts/BasicLayout/components/Footer/index.style.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/src/layouts/BasicLayout/components/Logo/index.jsx.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/src/layouts/BasicLayout/components/Logo/index.style.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/src/layouts/BasicLayout/components/PageNav/index.jsx.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/src/layouts/BasicLayout/index.jsx.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/src/layouts/BasicLayout/menuConfig.js.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/stylelintignore.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/stylelintrc.js.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/files/tsconfig.json.d.ts +2 -2
- package/types/plugins/project/framework/icejs/template/index.d.ts +3 -3
- package/types/plugins/project/framework/icejs/template/static-files.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/index.d.ts +11 -11
- package/types/plugins/project/framework/icejs3/plugins/appConfig.d.ts +5 -5
- package/types/plugins/project/framework/icejs3/plugins/buildConfig.d.ts +7 -7
- package/types/plugins/project/framework/icejs3/plugins/globalStyle.d.ts +3 -3
- package/types/plugins/project/framework/icejs3/plugins/layout.d.ts +3 -3
- package/types/plugins/project/framework/icejs3/plugins/packageJSON.d.ts +26 -26
- package/types/plugins/project/framework/icejs3/template/files/README.md.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/browserslistrc.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/document.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/gitignore.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/src/layouts/BasicLayout/components/Footer/index.jsx.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/src/layouts/BasicLayout/components/Footer/index.style.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/src/layouts/BasicLayout/components/Logo/index.jsx.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/src/layouts/BasicLayout/components/Logo/index.style.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/src/layouts/BasicLayout/components/PageNav/index.jsx.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/src/layouts/BasicLayout/index.jsx.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/src/layouts/BasicLayout/menuConfig.js.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/tsconfig.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/files/typings.d.ts +2 -2
- package/types/plugins/project/framework/icejs3/template/index.d.ts +3 -3
- package/types/plugins/project/framework/icejs3/template/static-files.d.ts +2 -2
- package/types/plugins/project/framework/rax/index.d.ts +12 -12
- package/types/plugins/project/framework/rax/plugins/appConfig.d.ts +4 -4
- package/types/plugins/project/framework/rax/plugins/buildConfig.d.ts +4 -4
- package/types/plugins/project/framework/rax/plugins/entry.d.ts +4 -4
- package/types/plugins/project/framework/rax/plugins/entryDocument.d.ts +7 -7
- package/types/plugins/project/framework/rax/plugins/globalStyle.d.ts +6 -6
- package/types/plugins/project/framework/rax/plugins/packageJSON.d.ts +4 -4
- package/types/plugins/project/framework/rax/template/files/.eslintignore.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/files/.eslintrc.js.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/files/.gitignore.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/files/.prettierignore.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/files/.prettierrc.js.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/files/.stylelintignore.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/files/.stylelintrc.js.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/files/README.md.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/files/jsconfig.json.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/files/tsconfig.json.d.ts +2 -2
- package/types/plugins/project/framework/rax/template/index.d.ts +3 -3
- package/types/plugins/project/framework/rax/template/static-files.d.ts +2 -2
- package/types/plugins/project/framework/rax/types/RaxFrameworkOptions.d.ts +81 -81
- package/types/plugins/project/framework/vuejs3/index.d.ts +11 -11
- package/types/plugins/project/framework/vuejs3/plugins/form.d.ts +3 -3
- package/types/plugins/project/framework/vuejs3/plugins/hooks.d.ts +3 -3
- package/types/plugins/project/framework/vuejs3/plugins/main.d.ts +4 -4
- package/types/plugins/project/framework/vuejs3/plugins/packageJSON.d.ts +26 -26
- package/types/plugins/project/framework/vuejs3/plugins/router.d.ts +3 -3
- package/types/plugins/project/framework/vuejs3/template/files/css/global.scss.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/css/mixin.scss.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/css/theme.css.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/env.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/eslintignore.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/eslintrc.yml.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/gitignore.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/index.html.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/npmrc.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/postcss.config.cjs.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/prettierignore.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/prettierrc.yml.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/src/App.vue.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/src/main.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/src/utils/utils.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/src/views/baseIndexA/tabs.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/src/views/baseIndexA/welcome.vue.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/src/vite-env.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/tsconfig.json.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/tsconfig.node.json.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/files/vite.config.ts.d.ts +2 -2
- package/types/plugins/project/framework/vuejs3/template/index.d.ts +3 -3
- package/types/plugins/project/framework/vuejs3/template/static-files.d.ts +2 -2
- package/types/plugins/project/i18n.d.ts +3 -3
- package/types/plugins/project/utils.d.ts +3 -3
- package/types/polyfills/buffer.d.ts +1 -1
- package/types/postprocessor/index.d.ts +2 -2
- package/types/postprocessor/prettier/index.d.ts +8 -8
- package/types/publisher/disk/index.d.ts +13 -13
- package/types/publisher/disk/utils.d.ts +9 -9
- package/types/publisher/zip/index.d.ts +14 -14
- package/types/publisher/zip/utils.d.ts +5 -5
- package/types/solutions/icejs.d.ts +18 -18
- package/types/solutions/icejs3.d.ts +15 -15
- package/types/solutions/rax-app.d.ts +27 -27
- package/types/solutions/vuejs3.d.ts +22 -22
- package/types/standalone-loader.d.ts +17 -17
- package/types/standalone-worker.d.ts +1 -1
- package/types/standalone.d.ts +260 -260
- package/types/types/analyze.d.ts +5 -5
- package/types/types/column-type.d.ts +316 -316
- package/types/types/core.d.ts +197 -197
- package/types/types/datasource-extra-base.d.ts +32 -32
- package/types/types/datasource-page-helper.d.ts +30 -30
- package/types/types/deps.d.ts +36 -36
- package/types/types/error.d.ts +10 -10
- package/types/types/file.d.ts +14 -14
- package/types/types/index.d.ts +8 -8
- package/types/types/intermediate.d.ts +234 -234
- package/types/types/jsx.d.ts +34 -34
- package/types/types/publisher.d.ts +14 -14
- package/types/types/tab.d.ts +6 -6
- package/types/utils/OrderedSet.d.ts +9 -9
- package/types/utils/Scope.d.ts +12 -12
- package/types/utils/ScopeBindings.d.ts +20 -20
- package/types/utils/aopHelper.d.ts +2 -2
- package/types/utils/apiHandler.d.ts +4 -4
- package/types/utils/changeCase.d.ts +10 -10
- package/types/utils/columnType.d.ts +1 -1
- package/types/utils/common.d.ts +14 -14
- package/types/utils/compositeType.d.ts +3 -3
- package/types/utils/dataSource.d.ts +17 -17
- package/types/utils/debug.d.ts +2 -2
- package/types/utils/encodeJsxAttrString.d.ts +1 -1
- package/types/utils/errors.d.ts +4 -4
- package/types/utils/expressionParser.d.ts +16 -16
- package/types/utils/format.d.ts +1 -1
- package/types/utils/index.d.ts +15 -15
- package/types/utils/jsExpression.d.ts +50 -50
- package/types/utils/jsSlot.d.ts +2 -2
- package/types/utils/jsxHelpers.d.ts +5 -5
- package/types/utils/nodeToJSX.d.ts +32 -32
- package/types/utils/nodeToTemplate.d.ts +17 -17
- package/types/utils/pathHelper.d.ts +6 -6
- package/types/utils/requestHandle.d.ts +77 -77
- package/types/utils/resultHelper.d.ts +51 -51
- package/types/utils/routerHandle.d.ts +11 -11
- package/types/utils/schema.d.ts +24 -24
- package/types/utils/templateHelper.d.ts +11 -11
- package/types/utils/theme.d.ts +9 -9
- package/types/utils/validate.d.ts +8 -8
- package/types/utils/version.d.ts +1 -1
|
@@ -1,234 +1,234 @@
|
|
|
1
|
-
import { IPublicTypeI18nMap, IPublicTypeUtilsMap, IPublicTypeContainerSchema, IPublicTypeJSONObject, IPublicTypeNodeSchema, IPublicTypeCompositeValue, IPublicTypeJSExpression, IPublicTypeJSFunction, IPublicTypeCompositeObject, InterpretDataSource } from '@alilc/lowcode-types';
|
|
2
|
-
import { IDependency, INpmPackage } from './deps';
|
|
3
|
-
import { ICompAnalyzeResult } from './analyze';
|
|
4
|
-
import { DataSourcePageHelperType } from './datasource-page-helper';
|
|
5
|
-
export interface IParseResult {
|
|
6
|
-
containers: IContainerInfo[];
|
|
7
|
-
globalUtils?: IUtilInfo;
|
|
8
|
-
globalI18n?: IPublicTypeI18nMap;
|
|
9
|
-
globalRouter?: IRouterInfo;
|
|
10
|
-
project?: IProjectInfo;
|
|
11
|
-
}
|
|
12
|
-
export interface IWithDependency {
|
|
13
|
-
deps?: IDependency[];
|
|
14
|
-
}
|
|
15
|
-
export interface IContainerInfo extends IPublicTypeContainerSchema, IWithDependency {
|
|
16
|
-
containerType: string;
|
|
17
|
-
moduleName: string;
|
|
18
|
-
analyzeResult?: ICompAnalyzeResult;
|
|
19
|
-
}
|
|
20
|
-
export interface IUtilInfo extends IWithDependency {
|
|
21
|
-
utils: IPublicTypeUtilsMap;
|
|
22
|
-
}
|
|
23
|
-
export interface RouterInfoItem {
|
|
24
|
-
path: string;
|
|
25
|
-
fileName: string;
|
|
26
|
-
componentName: string;
|
|
27
|
-
isFormRouter?: boolean;
|
|
28
|
-
firstPage: 'true' | 'false';
|
|
29
|
-
title: string;
|
|
30
|
-
}
|
|
31
|
-
export interface IRouterInfo extends IWithDependency {
|
|
32
|
-
routes: Array<RouterInfoItem>;
|
|
33
|
-
}
|
|
34
|
-
export interface IFormInfo extends IPublicTypeFormContainerSchema, IWithDependency {
|
|
35
|
-
containerType: string;
|
|
36
|
-
moduleName: string;
|
|
37
|
-
analyzeResult?: ICompAnalyzeResult;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* project's remarks
|
|
41
|
-
*/
|
|
42
|
-
export interface ProjectRemark {
|
|
43
|
-
/** if current project only contain one container which type is `Component` */
|
|
44
|
-
isSingleComponent?: boolean;
|
|
45
|
-
}
|
|
46
|
-
export interface IProjectInfo {
|
|
47
|
-
css?: string;
|
|
48
|
-
containersDeps?: IDependency[];
|
|
49
|
-
utilsDeps?: IDependency[];
|
|
50
|
-
constants?: IPublicTypeJSONObject;
|
|
51
|
-
i18n?: IPublicTypeI18nMap;
|
|
52
|
-
packages: INpmPackage[];
|
|
53
|
-
meta?: {
|
|
54
|
-
name?: string;
|
|
55
|
-
title?: string;
|
|
56
|
-
} | Record<string, any>;
|
|
57
|
-
config?: Record<string, any>;
|
|
58
|
-
dataSourcesTypes?: string[];
|
|
59
|
-
projectRemark?: ProjectRemark;
|
|
60
|
-
}
|
|
61
|
-
export interface IPageMeta {
|
|
62
|
-
router?: string;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* From meta
|
|
66
|
-
* page title
|
|
67
|
-
* router
|
|
68
|
-
* spmb
|
|
69
|
-
*
|
|
70
|
-
* Utils
|
|
71
|
-
*
|
|
72
|
-
* constants
|
|
73
|
-
*
|
|
74
|
-
* i18n
|
|
75
|
-
*
|
|
76
|
-
* components
|
|
77
|
-
*
|
|
78
|
-
* pages
|
|
79
|
-
*
|
|
80
|
-
* layout
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* 容器结构描述
|
|
84
|
-
*/
|
|
85
|
-
export interface IPublicTypeFormContainerSchema extends IPublicTypeNodeSchema {
|
|
86
|
-
/**
|
|
87
|
-
* 'Block' | 'Page' | 'Component';
|
|
88
|
-
*/
|
|
89
|
-
componentName: string;
|
|
90
|
-
/**
|
|
91
|
-
* 文件名称
|
|
92
|
-
*/
|
|
93
|
-
fileName: string;
|
|
94
|
-
/**
|
|
95
|
-
* @todo 待文档定义
|
|
96
|
-
*/
|
|
97
|
-
meta?: Record<string, unknown>;
|
|
98
|
-
/**
|
|
99
|
-
* 容器初始数据
|
|
100
|
-
*/
|
|
101
|
-
state?: {
|
|
102
|
-
[key: string]: IPublicTypeCompositeValue;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* 自定义方法设置
|
|
106
|
-
*/
|
|
107
|
-
methods?: {
|
|
108
|
-
[key: string]: IPublicTypeJSExpression | IPublicTypeJSFunction;
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* 生命周期对象
|
|
112
|
-
*/
|
|
113
|
-
lifeCycles?: {
|
|
114
|
-
[key: string]: IPublicTypeJSExpression | IPublicTypeJSFunction;
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* 样式文件
|
|
118
|
-
*/
|
|
119
|
-
css?: string;
|
|
120
|
-
/**
|
|
121
|
-
* 异步数据源配置
|
|
122
|
-
*/
|
|
123
|
-
dataSource?: ExtraInterpretDataSource;
|
|
124
|
-
/**
|
|
125
|
-
* 低代码业务组件默认属性
|
|
126
|
-
*/
|
|
127
|
-
defaultProps?: IPublicTypeCompositeObject;
|
|
128
|
-
}
|
|
129
|
-
export type TypeDataSourceType = 'dynamicForm' | 'dataDictionary' | 'dynamicFormCache' | 'dynamicFormDetail' | 'dataLoginUserInfo' | 'listSelectUser' | 'listSelectDept' | 'listSelectOrg' | 'formPage';
|
|
130
|
-
/**
|
|
131
|
-
* 自定义的额外信息
|
|
132
|
-
*/
|
|
133
|
-
export interface DataSourceCustomExtra {
|
|
134
|
-
/**
|
|
135
|
-
* 数据源类型(动态表单、数据字典、页面缓存)
|
|
136
|
-
*/
|
|
137
|
-
dataSourceType: TypeDataSourceType;
|
|
138
|
-
/**
|
|
139
|
-
* 当前的组件id
|
|
140
|
-
*/
|
|
141
|
-
componentId: string;
|
|
142
|
-
/**
|
|
143
|
-
* 使用的组件id(使用缓存数据的时候会用到)
|
|
144
|
-
*/
|
|
145
|
-
usedComponentId?: string;
|
|
146
|
-
/**
|
|
147
|
-
* 数据源id(数据字典code、动态表单id)
|
|
148
|
-
*/
|
|
149
|
-
id: string;
|
|
150
|
-
/**
|
|
151
|
-
* 数据源code(数据字典code、动态表单code)
|
|
152
|
-
*/
|
|
153
|
-
code: string;
|
|
154
|
-
/**
|
|
155
|
-
* 用于存储属性和绑定字段对应关系
|
|
156
|
-
*/
|
|
157
|
-
columnToAttribute: Record<string, any>;
|
|
158
|
-
/**
|
|
159
|
-
* 排序列
|
|
160
|
-
*/
|
|
161
|
-
extraSortList?: DataSourceCustomOrderItem[];
|
|
162
|
-
/**
|
|
163
|
-
* 额外参数列表
|
|
164
|
-
*/
|
|
165
|
-
extraParamList?: DataSourceExtraParams[];
|
|
166
|
-
/**
|
|
167
|
-
* 分页信息
|
|
168
|
-
*/
|
|
169
|
-
pageHelperInfo?: DataSourcePageHelperType;
|
|
170
|
-
/**
|
|
171
|
-
* 是否需要将数据缓存
|
|
172
|
-
*/
|
|
173
|
-
isOpenCache?: boolean;
|
|
174
|
-
/**
|
|
175
|
-
* 详情数据源配置面板
|
|
176
|
-
*/
|
|
177
|
-
configItemVariable?: ConfigItemVariableReturnType;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* 数据源类型
|
|
181
|
-
*/
|
|
182
|
-
export interface ExtraInterpretDataSource extends InterpretDataSource {
|
|
183
|
-
extra: Record<string, DataSourceCustomExtra>;
|
|
184
|
-
}
|
|
185
|
-
export type TypeCustomOrder = 'desc' | 'asc';
|
|
186
|
-
/**
|
|
187
|
-
* 排序列
|
|
188
|
-
*/
|
|
189
|
-
export interface DataSourceCustomOrderItem {
|
|
190
|
-
/**
|
|
191
|
-
* 排序的id
|
|
192
|
-
*/
|
|
193
|
-
key: string;
|
|
194
|
-
/**
|
|
195
|
-
* 排序的id
|
|
196
|
-
*/
|
|
197
|
-
id?: string;
|
|
198
|
-
/**
|
|
199
|
-
* 排序的值
|
|
200
|
-
*/
|
|
201
|
-
order: TypeCustomOrder;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* 额外字段
|
|
205
|
-
*/
|
|
206
|
-
export interface DataSourceExtraParams {
|
|
207
|
-
/**
|
|
208
|
-
* 排序的id
|
|
209
|
-
*/
|
|
210
|
-
key: string;
|
|
211
|
-
/**
|
|
212
|
-
* 额外参数的id
|
|
213
|
-
*/
|
|
214
|
-
id?: string;
|
|
215
|
-
/**
|
|
216
|
-
* 默认值
|
|
217
|
-
*/
|
|
218
|
-
value?: string;
|
|
219
|
-
}
|
|
220
|
-
export type TypeDataFrom = 'query' | 'cookie' | 'local-storage' | 'session-storage';
|
|
221
|
-
export interface ConfigItemVariableReturnType {
|
|
222
|
-
/**
|
|
223
|
-
* 数据值来源
|
|
224
|
-
*/
|
|
225
|
-
dataFrom: TypeDataFrom;
|
|
226
|
-
/**
|
|
227
|
-
* 数据值字段名称
|
|
228
|
-
*/
|
|
229
|
-
dataField: string;
|
|
230
|
-
/**
|
|
231
|
-
* 数据默认值
|
|
232
|
-
*/
|
|
233
|
-
defaultValue?: string;
|
|
234
|
-
}
|
|
1
|
+
import { IPublicTypeI18nMap, IPublicTypeUtilsMap, IPublicTypeContainerSchema, IPublicTypeJSONObject, IPublicTypeNodeSchema, IPublicTypeCompositeValue, IPublicTypeJSExpression, IPublicTypeJSFunction, IPublicTypeCompositeObject, InterpretDataSource } from '@alilc/lowcode-types';
|
|
2
|
+
import { IDependency, INpmPackage } from './deps';
|
|
3
|
+
import { ICompAnalyzeResult } from './analyze';
|
|
4
|
+
import { DataSourcePageHelperType } from './datasource-page-helper';
|
|
5
|
+
export interface IParseResult {
|
|
6
|
+
containers: IContainerInfo[];
|
|
7
|
+
globalUtils?: IUtilInfo;
|
|
8
|
+
globalI18n?: IPublicTypeI18nMap;
|
|
9
|
+
globalRouter?: IRouterInfo;
|
|
10
|
+
project?: IProjectInfo;
|
|
11
|
+
}
|
|
12
|
+
export interface IWithDependency {
|
|
13
|
+
deps?: IDependency[];
|
|
14
|
+
}
|
|
15
|
+
export interface IContainerInfo extends IPublicTypeContainerSchema, IWithDependency {
|
|
16
|
+
containerType: string;
|
|
17
|
+
moduleName: string;
|
|
18
|
+
analyzeResult?: ICompAnalyzeResult;
|
|
19
|
+
}
|
|
20
|
+
export interface IUtilInfo extends IWithDependency {
|
|
21
|
+
utils: IPublicTypeUtilsMap;
|
|
22
|
+
}
|
|
23
|
+
export interface RouterInfoItem {
|
|
24
|
+
path: string;
|
|
25
|
+
fileName: string;
|
|
26
|
+
componentName: string;
|
|
27
|
+
isFormRouter?: boolean;
|
|
28
|
+
firstPage: 'true' | 'false';
|
|
29
|
+
title: string;
|
|
30
|
+
}
|
|
31
|
+
export interface IRouterInfo extends IWithDependency {
|
|
32
|
+
routes: Array<RouterInfoItem>;
|
|
33
|
+
}
|
|
34
|
+
export interface IFormInfo extends IPublicTypeFormContainerSchema, IWithDependency {
|
|
35
|
+
containerType: string;
|
|
36
|
+
moduleName: string;
|
|
37
|
+
analyzeResult?: ICompAnalyzeResult;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* project's remarks
|
|
41
|
+
*/
|
|
42
|
+
export interface ProjectRemark {
|
|
43
|
+
/** if current project only contain one container which type is `Component` */
|
|
44
|
+
isSingleComponent?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface IProjectInfo {
|
|
47
|
+
css?: string;
|
|
48
|
+
containersDeps?: IDependency[];
|
|
49
|
+
utilsDeps?: IDependency[];
|
|
50
|
+
constants?: IPublicTypeJSONObject;
|
|
51
|
+
i18n?: IPublicTypeI18nMap;
|
|
52
|
+
packages: INpmPackage[];
|
|
53
|
+
meta?: {
|
|
54
|
+
name?: string;
|
|
55
|
+
title?: string;
|
|
56
|
+
} | Record<string, any>;
|
|
57
|
+
config?: Record<string, any>;
|
|
58
|
+
dataSourcesTypes?: string[];
|
|
59
|
+
projectRemark?: ProjectRemark;
|
|
60
|
+
}
|
|
61
|
+
export interface IPageMeta {
|
|
62
|
+
router?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* From meta
|
|
66
|
+
* page title
|
|
67
|
+
* router
|
|
68
|
+
* spmb
|
|
69
|
+
*
|
|
70
|
+
* Utils
|
|
71
|
+
*
|
|
72
|
+
* constants
|
|
73
|
+
*
|
|
74
|
+
* i18n
|
|
75
|
+
*
|
|
76
|
+
* components
|
|
77
|
+
*
|
|
78
|
+
* pages
|
|
79
|
+
*
|
|
80
|
+
* layout
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* 容器结构描述
|
|
84
|
+
*/
|
|
85
|
+
export interface IPublicTypeFormContainerSchema extends IPublicTypeNodeSchema {
|
|
86
|
+
/**
|
|
87
|
+
* 'Block' | 'Page' | 'Component';
|
|
88
|
+
*/
|
|
89
|
+
componentName: string;
|
|
90
|
+
/**
|
|
91
|
+
* 文件名称
|
|
92
|
+
*/
|
|
93
|
+
fileName: string;
|
|
94
|
+
/**
|
|
95
|
+
* @todo 待文档定义
|
|
96
|
+
*/
|
|
97
|
+
meta?: Record<string, unknown>;
|
|
98
|
+
/**
|
|
99
|
+
* 容器初始数据
|
|
100
|
+
*/
|
|
101
|
+
state?: {
|
|
102
|
+
[key: string]: IPublicTypeCompositeValue;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* 自定义方法设置
|
|
106
|
+
*/
|
|
107
|
+
methods?: {
|
|
108
|
+
[key: string]: IPublicTypeJSExpression | IPublicTypeJSFunction;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* 生命周期对象
|
|
112
|
+
*/
|
|
113
|
+
lifeCycles?: {
|
|
114
|
+
[key: string]: IPublicTypeJSExpression | IPublicTypeJSFunction;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* 样式文件
|
|
118
|
+
*/
|
|
119
|
+
css?: string;
|
|
120
|
+
/**
|
|
121
|
+
* 异步数据源配置
|
|
122
|
+
*/
|
|
123
|
+
dataSource?: ExtraInterpretDataSource;
|
|
124
|
+
/**
|
|
125
|
+
* 低代码业务组件默认属性
|
|
126
|
+
*/
|
|
127
|
+
defaultProps?: IPublicTypeCompositeObject;
|
|
128
|
+
}
|
|
129
|
+
export type TypeDataSourceType = 'dynamicForm' | 'dataDictionary' | 'dynamicFormCache' | 'dynamicFormDetail' | 'dataLoginUserInfo' | 'listSelectUser' | 'listSelectDept' | 'listSelectOrg' | 'formPage';
|
|
130
|
+
/**
|
|
131
|
+
* 自定义的额外信息
|
|
132
|
+
*/
|
|
133
|
+
export interface DataSourceCustomExtra {
|
|
134
|
+
/**
|
|
135
|
+
* 数据源类型(动态表单、数据字典、页面缓存)
|
|
136
|
+
*/
|
|
137
|
+
dataSourceType: TypeDataSourceType;
|
|
138
|
+
/**
|
|
139
|
+
* 当前的组件id
|
|
140
|
+
*/
|
|
141
|
+
componentId: string;
|
|
142
|
+
/**
|
|
143
|
+
* 使用的组件id(使用缓存数据的时候会用到)
|
|
144
|
+
*/
|
|
145
|
+
usedComponentId?: string;
|
|
146
|
+
/**
|
|
147
|
+
* 数据源id(数据字典code、动态表单id)
|
|
148
|
+
*/
|
|
149
|
+
id: string;
|
|
150
|
+
/**
|
|
151
|
+
* 数据源code(数据字典code、动态表单code)
|
|
152
|
+
*/
|
|
153
|
+
code: string;
|
|
154
|
+
/**
|
|
155
|
+
* 用于存储属性和绑定字段对应关系
|
|
156
|
+
*/
|
|
157
|
+
columnToAttribute: Record<string, any>;
|
|
158
|
+
/**
|
|
159
|
+
* 排序列
|
|
160
|
+
*/
|
|
161
|
+
extraSortList?: DataSourceCustomOrderItem[];
|
|
162
|
+
/**
|
|
163
|
+
* 额外参数列表
|
|
164
|
+
*/
|
|
165
|
+
extraParamList?: DataSourceExtraParams[];
|
|
166
|
+
/**
|
|
167
|
+
* 分页信息
|
|
168
|
+
*/
|
|
169
|
+
pageHelperInfo?: DataSourcePageHelperType;
|
|
170
|
+
/**
|
|
171
|
+
* 是否需要将数据缓存
|
|
172
|
+
*/
|
|
173
|
+
isOpenCache?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* 详情数据源配置面板
|
|
176
|
+
*/
|
|
177
|
+
configItemVariable?: ConfigItemVariableReturnType;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* 数据源类型
|
|
181
|
+
*/
|
|
182
|
+
export interface ExtraInterpretDataSource extends InterpretDataSource {
|
|
183
|
+
extra: Record<string, DataSourceCustomExtra>;
|
|
184
|
+
}
|
|
185
|
+
export type TypeCustomOrder = 'desc' | 'asc';
|
|
186
|
+
/**
|
|
187
|
+
* 排序列
|
|
188
|
+
*/
|
|
189
|
+
export interface DataSourceCustomOrderItem {
|
|
190
|
+
/**
|
|
191
|
+
* 排序的id
|
|
192
|
+
*/
|
|
193
|
+
key: string;
|
|
194
|
+
/**
|
|
195
|
+
* 排序的id
|
|
196
|
+
*/
|
|
197
|
+
id?: string;
|
|
198
|
+
/**
|
|
199
|
+
* 排序的值
|
|
200
|
+
*/
|
|
201
|
+
order: TypeCustomOrder;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* 额外字段
|
|
205
|
+
*/
|
|
206
|
+
export interface DataSourceExtraParams {
|
|
207
|
+
/**
|
|
208
|
+
* 排序的id
|
|
209
|
+
*/
|
|
210
|
+
key: string;
|
|
211
|
+
/**
|
|
212
|
+
* 额外参数的id
|
|
213
|
+
*/
|
|
214
|
+
id?: string;
|
|
215
|
+
/**
|
|
216
|
+
* 默认值
|
|
217
|
+
*/
|
|
218
|
+
value?: string;
|
|
219
|
+
}
|
|
220
|
+
export type TypeDataFrom = 'query' | 'cookie' | 'local-storage' | 'session-storage';
|
|
221
|
+
export interface ConfigItemVariableReturnType {
|
|
222
|
+
/**
|
|
223
|
+
* 数据值来源
|
|
224
|
+
*/
|
|
225
|
+
dataFrom: TypeDataFrom;
|
|
226
|
+
/**
|
|
227
|
+
* 数据值字段名称
|
|
228
|
+
*/
|
|
229
|
+
dataField: string;
|
|
230
|
+
/**
|
|
231
|
+
* 数据默认值
|
|
232
|
+
*/
|
|
233
|
+
defaultValue?: string;
|
|
234
|
+
}
|
package/types/types/jsx.d.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { IPublicTypeNodeSchema, IPublicTypeCompositeValue } from '@alilc/lowcode-types';
|
|
2
|
-
import { HandlerSet, BaseGenerator, NodeGenerator } from './core';
|
|
3
|
-
export declare enum PIECE_TYPE {
|
|
4
|
-
BEFORE = "NodeCodePieceBefore",
|
|
5
|
-
TAG = "NodeCodePieceTag",
|
|
6
|
-
ATTR = "NodeCodePieceAttr",
|
|
7
|
-
CHILDREN = "NodeCodePieceChildren",
|
|
8
|
-
AFTER = "NodeCodePieceAfter"
|
|
9
|
-
}
|
|
10
|
-
export interface CodePiece {
|
|
11
|
-
name?: string;
|
|
12
|
-
value: string;
|
|
13
|
-
type: PIECE_TYPE;
|
|
14
|
-
}
|
|
15
|
-
export interface AttrData {
|
|
16
|
-
attrName: string;
|
|
17
|
-
attrValue: IPublicTypeCompositeValue;
|
|
18
|
-
}
|
|
19
|
-
export type AttrPlugin = BaseGenerator<AttrData, CodePiece[], NodeGeneratorConfig>;
|
|
20
|
-
export type NodePlugin = BaseGenerator<IPublicTypeNodeSchema, CodePiece[], NodeGeneratorConfig>;
|
|
21
|
-
export interface NodeGeneratorConfig {
|
|
22
|
-
handlers?: HandlerSet<string>;
|
|
23
|
-
tagMapping?: (input: string) => string;
|
|
24
|
-
attrPlugins?: AttrPlugin[];
|
|
25
|
-
nodePlugins?: NodePlugin[];
|
|
26
|
-
self?: NodeGenerator<string>;
|
|
27
|
-
/**
|
|
28
|
-
* 是否要容忍对 JSExpression 求值时的异常
|
|
29
|
-
* 默认:true
|
|
30
|
-
* 注:如果容忍异常,则会在求值时包裹 try-catch 块 -- 通过 __$$eval / __$$evalArray
|
|
31
|
-
* catch 到异常时默认会抛出一个 CustomEvent 事件里面包含异常信息和求值的表达式
|
|
32
|
-
*/
|
|
33
|
-
tolerateEvalErrors?: boolean;
|
|
34
|
-
}
|
|
1
|
+
import { IPublicTypeNodeSchema, IPublicTypeCompositeValue } from '@alilc/lowcode-types';
|
|
2
|
+
import { HandlerSet, BaseGenerator, NodeGenerator } from './core';
|
|
3
|
+
export declare enum PIECE_TYPE {
|
|
4
|
+
BEFORE = "NodeCodePieceBefore",
|
|
5
|
+
TAG = "NodeCodePieceTag",
|
|
6
|
+
ATTR = "NodeCodePieceAttr",
|
|
7
|
+
CHILDREN = "NodeCodePieceChildren",
|
|
8
|
+
AFTER = "NodeCodePieceAfter"
|
|
9
|
+
}
|
|
10
|
+
export interface CodePiece {
|
|
11
|
+
name?: string;
|
|
12
|
+
value: string;
|
|
13
|
+
type: PIECE_TYPE;
|
|
14
|
+
}
|
|
15
|
+
export interface AttrData {
|
|
16
|
+
attrName: string;
|
|
17
|
+
attrValue: IPublicTypeCompositeValue;
|
|
18
|
+
}
|
|
19
|
+
export type AttrPlugin = BaseGenerator<AttrData, CodePiece[], NodeGeneratorConfig>;
|
|
20
|
+
export type NodePlugin = BaseGenerator<IPublicTypeNodeSchema, CodePiece[], NodeGeneratorConfig>;
|
|
21
|
+
export interface NodeGeneratorConfig {
|
|
22
|
+
handlers?: HandlerSet<string>;
|
|
23
|
+
tagMapping?: (input: string) => string;
|
|
24
|
+
attrPlugins?: AttrPlugin[];
|
|
25
|
+
nodePlugins?: NodePlugin[];
|
|
26
|
+
self?: NodeGenerator<string>;
|
|
27
|
+
/**
|
|
28
|
+
* 是否要容忍对 JSExpression 求值时的异常
|
|
29
|
+
* 默认:true
|
|
30
|
+
* 注:如果容忍异常,则会在求值时包裹 try-catch 块 -- 通过 __$$eval / __$$evalArray
|
|
31
|
+
* catch 到异常时默认会抛出一个 CustomEvent 事件里面包含异常信息和求值的表达式
|
|
32
|
+
*/
|
|
33
|
+
tolerateEvalErrors?: boolean;
|
|
34
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ResultDir } from '@alilc/lowcode-types';
|
|
2
|
-
export type PublisherFactory<T, U> = (configuration?: Partial<T>) => U;
|
|
3
|
-
export interface IPublisher<T, U> {
|
|
4
|
-
publish: (options?: T) => Promise<IPublisherResponse<U>>;
|
|
5
|
-
getProject: (() => ResultDir) | (() => void);
|
|
6
|
-
setProject: (project: ResultDir) => void;
|
|
7
|
-
}
|
|
8
|
-
export interface IPublisherFactoryParams {
|
|
9
|
-
project?: ResultDir;
|
|
10
|
-
}
|
|
11
|
-
export interface IPublisherResponse<T> {
|
|
12
|
-
success: boolean;
|
|
13
|
-
payload?: T;
|
|
14
|
-
}
|
|
1
|
+
import { ResultDir } from '@alilc/lowcode-types';
|
|
2
|
+
export type PublisherFactory<T, U> = (configuration?: Partial<T>) => U;
|
|
3
|
+
export interface IPublisher<T, U> {
|
|
4
|
+
publish: (options?: T) => Promise<IPublisherResponse<U>>;
|
|
5
|
+
getProject: (() => ResultDir) | (() => void);
|
|
6
|
+
setProject: (project: ResultDir) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface IPublisherFactoryParams {
|
|
9
|
+
project?: ResultDir;
|
|
10
|
+
}
|
|
11
|
+
export interface IPublisherResponse<T> {
|
|
12
|
+
success: boolean;
|
|
13
|
+
payload?: T;
|
|
14
|
+
}
|
package/types/types/tab.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface Tab {
|
|
2
|
-
text: string;
|
|
3
|
-
icon: string;
|
|
4
|
-
selectedIcon: string;
|
|
5
|
-
pageId: string;
|
|
6
|
-
}
|
|
1
|
+
export interface Tab {
|
|
2
|
+
text: string;
|
|
3
|
+
icon: string;
|
|
4
|
+
selectedIcon: string;
|
|
5
|
+
pageId: string;
|
|
6
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare class OrderedSet<T> {
|
|
2
|
-
private _set;
|
|
3
|
-
private _arr;
|
|
4
|
-
constructor(items?: T[]);
|
|
5
|
-
add(item: T): void;
|
|
6
|
-
delete(item: T): void;
|
|
7
|
-
has(item: T): boolean;
|
|
8
|
-
toArray(): T[];
|
|
9
|
-
}
|
|
1
|
+
export declare class OrderedSet<T> {
|
|
2
|
+
private _set;
|
|
3
|
+
private _arr;
|
|
4
|
+
constructor(items?: T[]);
|
|
5
|
+
add(item: T): void;
|
|
6
|
+
delete(item: T): void;
|
|
7
|
+
has(item: T): boolean;
|
|
8
|
+
toArray(): T[];
|
|
9
|
+
}
|
package/types/utils/Scope.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IScope } from '../types/core';
|
|
2
|
-
import { IScopeBindings } from './ScopeBindings';
|
|
3
|
-
export declare class Scope implements IScope {
|
|
4
|
-
readonly parent: IScope | null;
|
|
5
|
-
/**
|
|
6
|
-
* 创建根部 Scope,根据需要被上溯的作用域链决定是否开启新的
|
|
7
|
-
*/
|
|
8
|
-
static createRootScope(): IScope;
|
|
9
|
-
bindings?: IScopeBindings;
|
|
10
|
-
constructor(parent?: IScope | null);
|
|
11
|
-
createSubScope(ownIdentifiers: string[]): IScope;
|
|
12
|
-
}
|
|
1
|
+
import { IScope } from '../types/core';
|
|
2
|
+
import { IScopeBindings } from './ScopeBindings';
|
|
3
|
+
export declare class Scope implements IScope {
|
|
4
|
+
readonly parent: IScope | null;
|
|
5
|
+
/**
|
|
6
|
+
* 创建根部 Scope,根据需要被上溯的作用域链决定是否开启新的
|
|
7
|
+
*/
|
|
8
|
+
static createRootScope(): IScope;
|
|
9
|
+
bindings?: IScopeBindings;
|
|
10
|
+
constructor(parent?: IScope | null);
|
|
11
|
+
createSubScope(ownIdentifiers: string[]): IScope;
|
|
12
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export interface IScopeBindings {
|
|
2
|
-
readonly parent: IScopeBindings | null;
|
|
3
|
-
hasBinding: (varName: string) => boolean;
|
|
4
|
-
hasOwnBinding: (varName: string) => boolean;
|
|
5
|
-
addBinding: (varName: string) => void;
|
|
6
|
-
removeBinding: (varName: string) => void;
|
|
7
|
-
getAllBindings: () => string[];
|
|
8
|
-
getAllOwnedBindings: () => string[];
|
|
9
|
-
}
|
|
10
|
-
export declare class ScopeBindings implements IScopeBindings {
|
|
11
|
-
readonly parent: IScopeBindings | null;
|
|
12
|
-
private _bindings;
|
|
13
|
-
constructor(p?: IScopeBindings | null);
|
|
14
|
-
hasBinding(varName: string): boolean;
|
|
15
|
-
hasOwnBinding(varName: string): boolean;
|
|
16
|
-
addBinding(varName: string): void;
|
|
17
|
-
removeBinding(varName: string): void;
|
|
18
|
-
getAllBindings(): string[];
|
|
19
|
-
getAllOwnedBindings(): string[];
|
|
20
|
-
}
|
|
1
|
+
export interface IScopeBindings {
|
|
2
|
+
readonly parent: IScopeBindings | null;
|
|
3
|
+
hasBinding: (varName: string) => boolean;
|
|
4
|
+
hasOwnBinding: (varName: string) => boolean;
|
|
5
|
+
addBinding: (varName: string) => void;
|
|
6
|
+
removeBinding: (varName: string) => void;
|
|
7
|
+
getAllBindings: () => string[];
|
|
8
|
+
getAllOwnedBindings: () => string[];
|
|
9
|
+
}
|
|
10
|
+
export declare class ScopeBindings implements IScopeBindings {
|
|
11
|
+
readonly parent: IScopeBindings | null;
|
|
12
|
+
private _bindings;
|
|
13
|
+
constructor(p?: IScopeBindings | null);
|
|
14
|
+
hasBinding(varName: string): boolean;
|
|
15
|
+
hasOwnBinding(varName: string): boolean;
|
|
16
|
+
addBinding(varName: string): void;
|
|
17
|
+
removeBinding(varName: string): void;
|
|
18
|
+
getAllBindings(): string[];
|
|
19
|
+
getAllOwnedBindings(): string[];
|
|
20
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BaseGenerator, IScope } from '../types/core';
|
|
2
|
-
export declare function executeFunctionStack<I, T, C>(input: I, scope: IScope, funcs: BaseGenerator<I, T, C> | Array<BaseGenerator<I, T, C>>, baseFunc: BaseGenerator<I, T, C>, config?: C): T;
|
|
1
|
+
import { BaseGenerator, IScope } from '../types/core';
|
|
2
|
+
export declare function executeFunctionStack<I, T, C>(input: I, scope: IScope, funcs: BaseGenerator<I, T, C> | Array<BaseGenerator<I, T, C>>, baseFunc: BaseGenerator<I, T, C>, config?: C): T;
|