@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,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取api名称
|
|
3
|
-
*/
|
|
4
|
-
export declare function getApiName(apiId: string): string;
|
|
1
|
+
/**
|
|
2
|
+
* 获取api名称
|
|
3
|
+
*/
|
|
4
|
+
export declare function getApiName(apiId: string): string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 首字母改为大写,其他字母小写
|
|
3
|
-
* @param {string} str
|
|
4
|
-
*/
|
|
5
|
-
export declare function toFirstUpperCase(str: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* @description 下划线字符串转驼峰
|
|
8
|
-
* @param str
|
|
9
|
-
*/
|
|
10
|
-
export declare function lineToUppercase(str: string): string;
|
|
1
|
+
/**
|
|
2
|
+
* 首字母改为大写,其他字母小写
|
|
3
|
+
* @param {string} str
|
|
4
|
+
*/
|
|
5
|
+
export declare function toFirstUpperCase(str: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* @description 下划线字符串转驼峰
|
|
8
|
+
* @param str
|
|
9
|
+
*/
|
|
10
|
+
export declare function lineToUppercase(str: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getFieldType: (columnKeyType: number) => "text" | "field" | "textarea" | "date-picker" | "time-picker" | "switch" | "radio" | "checkbox" | "picker" | "cascader" | "uploader" | "auto-complete" | "rich-text" | "amap" | "rate";
|
|
1
|
+
export declare const getFieldType: (columnKeyType: number) => "text" | "field" | "textarea" | "date-picker" | "time-picker" | "switch" | "radio" | "checkbox" | "picker" | "cascader" | "uploader" | "auto-complete" | "rich-text" | "amap" | "rate";
|
package/types/utils/common.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { IPublicTypeJSFunction } from '@alilc/lowcode-types';
|
|
2
|
-
import { IDependency, IExternalDependency, IInternalDependency } from '../types';
|
|
3
|
-
export declare function camel2dash(input: string): string;
|
|
4
|
-
/**
|
|
5
|
-
* 转为驼峰
|
|
6
|
-
*/
|
|
7
|
-
export declare function camelize(str: string): string;
|
|
8
|
-
export declare function generateID(): string;
|
|
9
|
-
export declare function upperCaseFirst(inputValue: string): string;
|
|
10
|
-
export declare function uniqueArray<T>(arr: T[], by: (i: T) => string): T[];
|
|
11
|
-
export declare function getStaticExprValue<T>(expr: string): T;
|
|
12
|
-
export declare function isJSExpressionFn(data: any): data is IPublicTypeJSFunction;
|
|
13
|
-
export declare function isInternalDependency(dependency: IDependency): dependency is IInternalDependency;
|
|
14
|
-
export declare function isExternalDependency(dependency: IDependency): dependency is IExternalDependency;
|
|
1
|
+
import type { IPublicTypeJSFunction } from '@alilc/lowcode-types';
|
|
2
|
+
import { IDependency, IExternalDependency, IInternalDependency } from '../types';
|
|
3
|
+
export declare function camel2dash(input: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* 转为驼峰
|
|
6
|
+
*/
|
|
7
|
+
export declare function camelize(str: string): string;
|
|
8
|
+
export declare function generateID(): string;
|
|
9
|
+
export declare function upperCaseFirst(inputValue: string): string;
|
|
10
|
+
export declare function uniqueArray<T>(arr: T[], by: (i: T) => string): T[];
|
|
11
|
+
export declare function getStaticExprValue<T>(expr: string): T;
|
|
12
|
+
export declare function isJSExpressionFn(data: any): data is IPublicTypeJSFunction;
|
|
13
|
+
export declare function isInternalDependency(dependency: IDependency): dependency is IInternalDependency;
|
|
14
|
+
export declare function isExternalDependency(dependency: IDependency): dependency is IExternalDependency;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IPublicTypeCompositeValue } from '@alilc/lowcode-types';
|
|
2
|
-
import { IScope, CompositeValueGeneratorOptions } from '../types';
|
|
3
|
-
export declare function generateCompositeType(value: IPublicTypeCompositeValue, scope: IScope, options?: CompositeValueGeneratorOptions): string;
|
|
1
|
+
import { IPublicTypeCompositeValue } from '@alilc/lowcode-types';
|
|
2
|
+
import { IScope, CompositeValueGeneratorOptions } from '../types';
|
|
3
|
+
export declare function generateCompositeType(value: IPublicTypeCompositeValue, scope: IScope, options?: CompositeValueGeneratorOptions): string;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { DataSourceCustomExtra, IProjectInfo } from '../types/intermediate';
|
|
2
|
-
export interface DataSourceDependenciesConfig {
|
|
3
|
-
/** 数据源引擎的版本 */
|
|
4
|
-
engineVersion?: string;
|
|
5
|
-
/** 数据源引擎的包名 */
|
|
6
|
-
enginePackage?: string;
|
|
7
|
-
/** 数据源 handlers 的版本 */
|
|
8
|
-
handlersVersion?: {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
/** 数据源 handlers 的包名 */
|
|
12
|
-
handlersPackages?: {
|
|
13
|
-
[key: string]: string;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export declare function buildDataSourceDependencies(ir: IProjectInfo, cfg?: DataSourceDependenciesConfig): Record<string, string>;
|
|
17
|
-
export declare function isFormPage(obj: Record<string, DataSourceCustomExtra>): boolean;
|
|
1
|
+
import type { DataSourceCustomExtra, IProjectInfo } from '../types/intermediate';
|
|
2
|
+
export interface DataSourceDependenciesConfig {
|
|
3
|
+
/** 数据源引擎的版本 */
|
|
4
|
+
engineVersion?: string;
|
|
5
|
+
/** 数据源引擎的包名 */
|
|
6
|
+
enginePackage?: string;
|
|
7
|
+
/** 数据源 handlers 的版本 */
|
|
8
|
+
handlersVersion?: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
};
|
|
11
|
+
/** 数据源 handlers 的包名 */
|
|
12
|
+
handlersPackages?: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare function buildDataSourceDependencies(ir: IProjectInfo, cfg?: DataSourceDependenciesConfig): Record<string, string>;
|
|
17
|
+
export declare function isFormPage(obj: Record<string, DataSourceCustomExtra>): boolean;
|
package/types/utils/debug.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import createDebug from 'debug';
|
|
2
|
-
export declare const debug: createDebug.Debugger;
|
|
1
|
+
import createDebug from 'debug';
|
|
2
|
+
export declare const debug: createDebug.Debugger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function encodeJsxStringNode(str: string): string;
|
|
1
|
+
export declare function encodeJsxStringNode(str: string): string;
|
package/types/utils/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取错误信息
|
|
3
|
-
*/
|
|
4
|
-
export declare function getErrorMessage(error: unknown): string | null;
|
|
1
|
+
/**
|
|
2
|
+
* 获取错误信息
|
|
3
|
+
*/
|
|
4
|
+
export declare function getErrorMessage(error: unknown): string | null;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as parser from '@babel/parser';
|
|
2
|
-
import * as t from '@babel/types';
|
|
3
|
-
import { IScope } from '../types';
|
|
4
|
-
export declare class ParseError extends Error {
|
|
5
|
-
readonly expr: string | t.Expression;
|
|
6
|
-
readonly detail: unknown;
|
|
7
|
-
constructor(expr: string | t.Expression, detail: unknown);
|
|
8
|
-
}
|
|
9
|
-
export interface ParseExpressionGetGlobalVariablesOptions {
|
|
10
|
-
filter?: (varName: string) => boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare function parseExpressionGetKeywords(expr: string | null | undefined): string[];
|
|
13
|
-
export declare function parseExpressionGetGlobalVariables(expr: string | null | undefined, { filter }?: ParseExpressionGetGlobalVariablesOptions): string[];
|
|
14
|
-
export declare function parseExpressionConvertThis2Context(expr: string | t.Expression, contextName?: string, localVariables?: string[]): string;
|
|
15
|
-
export declare function parseExpression(expr: string): parser.ParseResult<t.Expression>;
|
|
16
|
-
export declare function transformExpressionLocalRef(expr: string, scope: IScope): any;
|
|
1
|
+
import * as parser from '@babel/parser';
|
|
2
|
+
import * as t from '@babel/types';
|
|
3
|
+
import { IScope } from '../types';
|
|
4
|
+
export declare class ParseError extends Error {
|
|
5
|
+
readonly expr: string | t.Expression;
|
|
6
|
+
readonly detail: unknown;
|
|
7
|
+
constructor(expr: string | t.Expression, detail: unknown);
|
|
8
|
+
}
|
|
9
|
+
export interface ParseExpressionGetGlobalVariablesOptions {
|
|
10
|
+
filter?: (varName: string) => boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function parseExpressionGetKeywords(expr: string | null | undefined): string[];
|
|
13
|
+
export declare function parseExpressionGetGlobalVariables(expr: string | null | undefined, { filter }?: ParseExpressionGetGlobalVariablesOptions): string[];
|
|
14
|
+
export declare function parseExpressionConvertThis2Context(expr: string | t.Expression, contextName?: string, localVariables?: string[]): string;
|
|
15
|
+
export declare function parseExpression(expr: string): parser.ParseResult<t.Expression>;
|
|
16
|
+
export declare function transformExpressionLocalRef(expr: string, scope: IScope): any;
|
package/types/utils/format.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function format(content: string, options?: {}): string;
|
|
1
|
+
export declare function format(content: string, options?: {}): string;
|
package/types/utils/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as common from './common';
|
|
2
|
-
import * as compositeType from './compositeType';
|
|
3
|
-
import * as jsExpression from './jsExpression';
|
|
4
|
-
import * as jsSlot from './jsSlot';
|
|
5
|
-
import * as nodeToJSX from './nodeToJSX';
|
|
6
|
-
import * as resultHelper from './resultHelper';
|
|
7
|
-
import * as templateHelper from './templateHelper';
|
|
8
|
-
import * as validate from './validate';
|
|
9
|
-
import * as schema from './schema';
|
|
10
|
-
import * as version from './version';
|
|
11
|
-
import * as scope from './Scope';
|
|
12
|
-
import * as expressionParser from './expressionParser';
|
|
13
|
-
import * as dataSource from './dataSource';
|
|
14
|
-
import * as pathHelper from './pathHelper';
|
|
15
|
-
export { common, compositeType, jsExpression, jsSlot, nodeToJSX, resultHelper, templateHelper, validate, schema, version, scope, expressionParser, dataSource, pathHelper, };
|
|
1
|
+
import * as common from './common';
|
|
2
|
+
import * as compositeType from './compositeType';
|
|
3
|
+
import * as jsExpression from './jsExpression';
|
|
4
|
+
import * as jsSlot from './jsSlot';
|
|
5
|
+
import * as nodeToJSX from './nodeToJSX';
|
|
6
|
+
import * as resultHelper from './resultHelper';
|
|
7
|
+
import * as templateHelper from './templateHelper';
|
|
8
|
+
import * as validate from './validate';
|
|
9
|
+
import * as schema from './schema';
|
|
10
|
+
import * as version from './version';
|
|
11
|
+
import * as scope from './Scope';
|
|
12
|
+
import * as expressionParser from './expressionParser';
|
|
13
|
+
import * as dataSource from './dataSource';
|
|
14
|
+
import * as pathHelper from './pathHelper';
|
|
15
|
+
export { common, compositeType, jsExpression, jsSlot, nodeToJSX, resultHelper, templateHelper, validate, schema, version, scope, expressionParser, dataSource, pathHelper, };
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import * as t from '@babel/types';
|
|
2
|
-
import { IScope } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* 是否是广义上的 JSFunction
|
|
5
|
-
* @param value
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare function isBroadJSFunction(value: unknown): boolean;
|
|
9
|
-
export declare function generateExpression(value: any, scope: IScope): string;
|
|
10
|
-
/**
|
|
11
|
-
* 生成函数代码
|
|
12
|
-
*
|
|
13
|
-
* @param value 函数或表达式
|
|
14
|
-
* @param config 配置对象,包含以下属性:
|
|
15
|
-
* - name: 函数名称,可选
|
|
16
|
-
* - isMember: 是否为成员函数,默认为false
|
|
17
|
-
* - isBlock: 是否为块级函数,默认为false
|
|
18
|
-
* - isArrow: 是否为箭头函数,默认为false
|
|
19
|
-
* - isBindExpr: 是否为绑定表达式,默认为false
|
|
20
|
-
* - isToVue 是否转化为vue(state,this转换)
|
|
21
|
-
* - isDeleteLastSemicolon 是否删除生成代码最后的一个分号,默认为false
|
|
22
|
-
* - isBelongTemplate 是否是template的表达式
|
|
23
|
-
* @returns 返回生成的函数代码
|
|
24
|
-
* @throws 当 value 不是 JSFunction 或 JSExpression 时抛出 CodeGeneratorError
|
|
25
|
-
*/
|
|
26
|
-
export declare function generateFunction(value: any, config?: {
|
|
27
|
-
name?: string;
|
|
28
|
-
isMember?: boolean;
|
|
29
|
-
isBlock?: boolean;
|
|
30
|
-
isArrow?: boolean;
|
|
31
|
-
isBindExpr?: boolean;
|
|
32
|
-
isToVue?: boolean;
|
|
33
|
-
isDeleteLastSemicolon?: boolean;
|
|
34
|
-
isBelongTemplate?: boolean;
|
|
35
|
-
}): any;
|
|
36
|
-
/**
|
|
37
|
-
* 解析给定的字符串内容为js表达式。
|
|
38
|
-
* @note 使用babel转化为ast树,再对树进行处理
|
|
39
|
-
* @param content 要解析的字符串内容。
|
|
40
|
-
* @param isToVue
|
|
41
|
-
* @param isBelongTemplate 是否是template的表达式
|
|
42
|
-
* @returns 解析成功的表达式节点,如果解析失败则返回null。
|
|
43
|
-
* @throws 如果解析过程中发生错误,将抛出ParseError异常。
|
|
44
|
-
*/
|
|
45
|
-
export declare function parseExpression(content: string, isToVue?: boolean, isBelongTemplate?: boolean): t.FunctionExpression | null;
|
|
46
|
-
/**
|
|
47
|
-
* 解析js表达式获取this.state.xxx 的xxx
|
|
48
|
-
* @param content
|
|
49
|
-
*/
|
|
50
|
-
export declare function parseExpressionGetState(content: string): Set<string>;
|
|
1
|
+
import * as t from '@babel/types';
|
|
2
|
+
import { IScope } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* 是否是广义上的 JSFunction
|
|
5
|
+
* @param value
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function isBroadJSFunction(value: unknown): boolean;
|
|
9
|
+
export declare function generateExpression(value: any, scope: IScope): string;
|
|
10
|
+
/**
|
|
11
|
+
* 生成函数代码
|
|
12
|
+
*
|
|
13
|
+
* @param value 函数或表达式
|
|
14
|
+
* @param config 配置对象,包含以下属性:
|
|
15
|
+
* - name: 函数名称,可选
|
|
16
|
+
* - isMember: 是否为成员函数,默认为false
|
|
17
|
+
* - isBlock: 是否为块级函数,默认为false
|
|
18
|
+
* - isArrow: 是否为箭头函数,默认为false
|
|
19
|
+
* - isBindExpr: 是否为绑定表达式,默认为false
|
|
20
|
+
* - isToVue 是否转化为vue(state,this转换)
|
|
21
|
+
* - isDeleteLastSemicolon 是否删除生成代码最后的一个分号,默认为false
|
|
22
|
+
* - isBelongTemplate 是否是template的表达式
|
|
23
|
+
* @returns 返回生成的函数代码
|
|
24
|
+
* @throws 当 value 不是 JSFunction 或 JSExpression 时抛出 CodeGeneratorError
|
|
25
|
+
*/
|
|
26
|
+
export declare function generateFunction(value: any, config?: {
|
|
27
|
+
name?: string;
|
|
28
|
+
isMember?: boolean;
|
|
29
|
+
isBlock?: boolean;
|
|
30
|
+
isArrow?: boolean;
|
|
31
|
+
isBindExpr?: boolean;
|
|
32
|
+
isToVue?: boolean;
|
|
33
|
+
isDeleteLastSemicolon?: boolean;
|
|
34
|
+
isBelongTemplate?: boolean;
|
|
35
|
+
}): any;
|
|
36
|
+
/**
|
|
37
|
+
* 解析给定的字符串内容为js表达式。
|
|
38
|
+
* @note 使用babel转化为ast树,再对树进行处理
|
|
39
|
+
* @param content 要解析的字符串内容。
|
|
40
|
+
* @param isToVue
|
|
41
|
+
* @param isBelongTemplate 是否是template的表达式
|
|
42
|
+
* @returns 解析成功的表达式节点,如果解析失败则返回null。
|
|
43
|
+
* @throws 如果解析过程中发生错误,将抛出ParseError异常。
|
|
44
|
+
*/
|
|
45
|
+
export declare function parseExpression(content: string, isToVue?: boolean, isBelongTemplate?: boolean): t.FunctionExpression | null;
|
|
46
|
+
/**
|
|
47
|
+
* 解析js表达式获取this.state.xxx 的xxx
|
|
48
|
+
* @param content
|
|
49
|
+
*/
|
|
50
|
+
export declare function parseExpressionGetState(content: string): Set<string>;
|
package/types/utils/jsSlot.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeGenerator, IScope } from '../types';
|
|
2
|
-
export declare function generateJsSlot(slot: any, scope: IScope, generator: NodeGenerator<string>): string;
|
|
1
|
+
import { NodeGenerator, IScope } from '../types';
|
|
2
|
+
export declare function generateJsSlot(slot: any, scope: IScope, generator: NodeGenerator<string>): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 去掉 JS 表达式的 "{...}" 的封装, 如:
|
|
3
|
-
* {<xxx />} => <xxx />
|
|
4
|
-
*/
|
|
5
|
-
export declare function unwrapJsExprQuoteInJsx(jsxExpr: string): string;
|
|
1
|
+
/**
|
|
2
|
+
* 去掉 JS 表达式的 "{...}" 的封装, 如:
|
|
3
|
+
* {<xxx />} => <xxx />
|
|
4
|
+
*/
|
|
5
|
+
export declare function unwrapJsExprQuoteInJsx(jsxExpr: string): string;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { IPublicTypeNodeSchema } from '@alilc/lowcode-types';
|
|
2
|
-
import { IScope, CodePiece, NodeGenerator, NodeGeneratorConfig, NodePlugin } from '../types';
|
|
3
|
-
export declare function isPureString(v: string): boolean;
|
|
4
|
-
/**
|
|
5
|
-
* JSX 生成逻辑插件。在 React 代码模式下生成 loop 相关的逻辑代码
|
|
6
|
-
* @type NodePlugin Extended
|
|
7
|
-
*
|
|
8
|
-
* @export
|
|
9
|
-
* @param {IPublicTypeNodeSchema} nodeItem 当前 UI 节点
|
|
10
|
-
* @returns {CodePiece[]} 实现功能的相关代码片段
|
|
11
|
-
*/
|
|
12
|
-
export declare function generateReactLoopCtrl(nodeItem: IPublicTypeNodeSchema, scope: IScope, config?: NodeGeneratorConfig, next?: NodePlugin): CodePiece[];
|
|
13
|
-
/**
|
|
14
|
-
* JSX 生成逻辑插件。在 React 代码模式下生成 condition 相关的逻辑代码
|
|
15
|
-
* @type NodePlugin
|
|
16
|
-
*
|
|
17
|
-
* @export
|
|
18
|
-
* @param {IPublicTypeNodeSchema} nodeItem 当前 UI 节点
|
|
19
|
-
* @returns {CodePiece[]} 实现功能的相关代码片段
|
|
20
|
-
*/
|
|
21
|
-
export declare function generateConditionReactCtrl(nodeItem: IPublicTypeNodeSchema, scope: IScope, config?: NodeGeneratorConfig, next?: NodePlugin): CodePiece[];
|
|
22
|
-
/**
|
|
23
|
-
* JSX 生成逻辑插件。在 React 代码模式下,如果 Node 生成结果是一个表达式,则对其进行 { Expression } 包装
|
|
24
|
-
* @type NodePlugin
|
|
25
|
-
*
|
|
26
|
-
* @export
|
|
27
|
-
* @param {IPublicTypeNodeSchema} nodeItem 当前 UI 节点
|
|
28
|
-
* @returns {CodePiece[]} 实现功能的相关代码片段
|
|
29
|
-
*/
|
|
30
|
-
export declare function generateReactExprInJS(nodeItem: IPublicTypeNodeSchema, scope: IScope, config?: NodeGeneratorConfig, next?: NodePlugin): CodePiece[];
|
|
31
|
-
export declare function createNodeGenerator(cfg?: NodeGeneratorConfig): NodeGenerator<string>;
|
|
32
|
-
export declare function createReactNodeGenerator(cfg?: NodeGeneratorConfig): NodeGenerator<string>;
|
|
1
|
+
import { IPublicTypeNodeSchema } from '@alilc/lowcode-types';
|
|
2
|
+
import { IScope, CodePiece, NodeGenerator, NodeGeneratorConfig, NodePlugin } from '../types';
|
|
3
|
+
export declare function isPureString(v: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* JSX 生成逻辑插件。在 React 代码模式下生成 loop 相关的逻辑代码
|
|
6
|
+
* @type NodePlugin Extended
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @param {IPublicTypeNodeSchema} nodeItem 当前 UI 节点
|
|
10
|
+
* @returns {CodePiece[]} 实现功能的相关代码片段
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateReactLoopCtrl(nodeItem: IPublicTypeNodeSchema, scope: IScope, config?: NodeGeneratorConfig, next?: NodePlugin): CodePiece[];
|
|
13
|
+
/**
|
|
14
|
+
* JSX 生成逻辑插件。在 React 代码模式下生成 condition 相关的逻辑代码
|
|
15
|
+
* @type NodePlugin
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @param {IPublicTypeNodeSchema} nodeItem 当前 UI 节点
|
|
19
|
+
* @returns {CodePiece[]} 实现功能的相关代码片段
|
|
20
|
+
*/
|
|
21
|
+
export declare function generateConditionReactCtrl(nodeItem: IPublicTypeNodeSchema, scope: IScope, config?: NodeGeneratorConfig, next?: NodePlugin): CodePiece[];
|
|
22
|
+
/**
|
|
23
|
+
* JSX 生成逻辑插件。在 React 代码模式下,如果 Node 生成结果是一个表达式,则对其进行 { Expression } 包装
|
|
24
|
+
* @type NodePlugin
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @param {IPublicTypeNodeSchema} nodeItem 当前 UI 节点
|
|
28
|
+
* @returns {CodePiece[]} 实现功能的相关代码片段
|
|
29
|
+
*/
|
|
30
|
+
export declare function generateReactExprInJS(nodeItem: IPublicTypeNodeSchema, scope: IScope, config?: NodeGeneratorConfig, next?: NodePlugin): CodePiece[];
|
|
31
|
+
export declare function createNodeGenerator(cfg?: NodeGeneratorConfig): NodeGenerator<string>;
|
|
32
|
+
export declare function createReactNodeGenerator(cfg?: NodeGeneratorConfig): NodeGenerator<string>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { IScope, NodeGenerator, NodeGeneratorConfig } from '../types';
|
|
2
|
-
import { IPublicTypeNodeSchema, IPublicTypeNodeDataType } from '@alilc/lowcode-types';
|
|
3
|
-
export declare function isPureString(v: string): boolean;
|
|
4
|
-
export declare function createNodeGenerator(cfg?: NodeGeneratorConfig): NodeGenerator<string>;
|
|
5
|
-
export declare function createVueNodeGenerator(cfg?: NodeGeneratorConfig): NodeGenerator<string>;
|
|
6
|
-
/**
|
|
7
|
-
* 生成指定节点
|
|
8
|
-
* @param name 指定节点名称
|
|
9
|
-
* @param nodeItem schema文件
|
|
10
|
-
* @param scope
|
|
11
|
-
* @param cfg 配置
|
|
12
|
-
* @param props 要额外添加给组件的属性
|
|
13
|
-
*/
|
|
14
|
-
export declare function generateByName(cfg: NodeGeneratorConfig | undefined, name: string, nodeItem: IPublicTypeNodeDataType, scope: IScope, props: Record<string, any>): {
|
|
15
|
-
code: string;
|
|
16
|
-
node: IPublicTypeNodeSchema;
|
|
17
|
-
};
|
|
1
|
+
import { IScope, NodeGenerator, NodeGeneratorConfig } from '../types';
|
|
2
|
+
import { IPublicTypeNodeSchema, IPublicTypeNodeDataType } from '@alilc/lowcode-types';
|
|
3
|
+
export declare function isPureString(v: string): boolean;
|
|
4
|
+
export declare function createNodeGenerator(cfg?: NodeGeneratorConfig): NodeGenerator<string>;
|
|
5
|
+
export declare function createVueNodeGenerator(cfg?: NodeGeneratorConfig): NodeGenerator<string>;
|
|
6
|
+
/**
|
|
7
|
+
* 生成指定节点
|
|
8
|
+
* @param name 指定节点名称
|
|
9
|
+
* @param nodeItem schema文件
|
|
10
|
+
* @param scope
|
|
11
|
+
* @param cfg 配置
|
|
12
|
+
* @param props 要额外添加给组件的属性
|
|
13
|
+
*/
|
|
14
|
+
export declare function generateByName(cfg: NodeGeneratorConfig | undefined, name: string, nodeItem: IPublicTypeNodeDataType, scope: IScope, props: Record<string, any>): {
|
|
15
|
+
code: string;
|
|
16
|
+
node: IPublicTypeNodeSchema;
|
|
17
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IContextData } from '../types';
|
|
2
|
-
export declare function getSlotRelativePath(options: {
|
|
3
|
-
contextData: IContextData;
|
|
4
|
-
from: string;
|
|
5
|
-
to: string;
|
|
6
|
-
}): string;
|
|
1
|
+
import { IContextData } from '../types';
|
|
2
|
+
export declare function getSlotRelativePath(options: {
|
|
3
|
+
contextData: IContextData;
|
|
4
|
+
from: string;
|
|
5
|
+
to: string;
|
|
6
|
+
}): string;
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { JSONObject } from '@alilc/lowcode-datasource-types/src/value-type';
|
|
2
|
-
import { InterpretDataSourceConfig } from '@alilc/lowcode-types';
|
|
3
|
-
import { DataSourceCustomExtra, ExtraInterpretDataSource } from '../types';
|
|
4
|
-
export declare const PREFIX_API_CACHE = "page_cache_";
|
|
5
|
-
export declare const PREFIX_PAGE_NUM = "_nowPage";
|
|
6
|
-
export declare const PREFIX_IS_LAST_PAGE = "_isLastPage";
|
|
7
|
-
export declare const PREFIX_API_PARAM_NAME = "Params";
|
|
8
|
-
export declare const SUFFIX_API_SCRIPT = "Request";
|
|
9
|
-
export declare const SUFFIX_DATA_SOURCE_MAP = "dataSourceMap";
|
|
10
|
-
export declare const SUFFIX_API_METHOD = "Method";
|
|
11
|
-
export declare const GLOBE_API_PARAM = "globeParam";
|
|
12
|
-
export type TypeDataSourceType = 'dynamicForm' | 'dataDictionary' | 'dynamicFormCache' | 'dynamicFormDetail' | 'dataLoginUserInfo';
|
|
13
|
-
/**
|
|
14
|
-
* 请求头处理
|
|
15
|
-
* @param headers 请求头
|
|
16
|
-
*/
|
|
17
|
-
export declare function requestHeaderHandler(headers: JSONObject): string;
|
|
18
|
-
/**
|
|
19
|
-
* 请求体处理
|
|
20
|
-
* @param params 请求体
|
|
21
|
-
*/
|
|
22
|
-
export declare function requestParamsHandler(params: JSONObject): string;
|
|
23
|
-
/**
|
|
24
|
-
* 请求结果处理
|
|
25
|
-
*/
|
|
26
|
-
export declare function requestAfterDataHandler(dataSourceItems: InterpretDataSourceConfig, extra: Record<string, DataSourceCustomExtra>): string[];
|
|
27
|
-
/**
|
|
28
|
-
* 是否是js表达式
|
|
29
|
-
* @param value
|
|
30
|
-
*/
|
|
31
|
-
export declare function isJsExpression(value: any): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* 将线上地址转为出码后的请求地址
|
|
34
|
-
* @param dataSourceConfig
|
|
35
|
-
* @param extra 额外参数
|
|
36
|
-
*/
|
|
37
|
-
export declare function handleUrl(dataSourceConfig: InterpretDataSourceConfig, extra: any): string;
|
|
38
|
-
/**
|
|
39
|
-
* 处理分页请求参数
|
|
40
|
-
* 将分页参数转换为ref(pageNum和isLastPage)
|
|
41
|
-
*/
|
|
42
|
-
export declare function handlePageParamToRef(data: ExtraInterpretDataSource): string[];
|
|
43
|
-
/**
|
|
44
|
-
* 将请求参数itemList里面的this.state.xxx 都包裹进reactive里面
|
|
45
|
-
* @param data
|
|
46
|
-
*/
|
|
47
|
-
export declare function handleParamToRef(data: ExtraInterpretDataSource): string[];
|
|
48
|
-
/**
|
|
49
|
-
* 将API转换为ref变量
|
|
50
|
-
* @param data
|
|
51
|
-
*/
|
|
52
|
-
export declare function handleApiToRef(data: ExtraInterpretDataSource): string[];
|
|
53
|
-
/**
|
|
54
|
-
* 获取数据源的id
|
|
55
|
-
* @param id
|
|
56
|
-
* @param extra
|
|
57
|
-
*/
|
|
58
|
-
export declare function getApiId(id: string, extra: Record<string, DataSourceCustomExtra>): string;
|
|
59
|
-
/**
|
|
60
|
-
* 获取请求参数名字
|
|
61
|
-
* @param id
|
|
62
|
-
*/
|
|
63
|
-
export declare function getApiParamName(id: string): string;
|
|
64
|
-
/**
|
|
65
|
-
* 获取请求后置处理方法名
|
|
66
|
-
* @param id
|
|
67
|
-
*/
|
|
68
|
-
export declare function getApiHandleFunctionName(id: string): string;
|
|
69
|
-
/**
|
|
70
|
-
* 获取script 里引入的api名称
|
|
71
|
-
*/
|
|
72
|
-
export declare function getApiName(apiId: string): string;
|
|
73
|
-
/**
|
|
74
|
-
* 获取api请求方法名
|
|
75
|
-
* @param id
|
|
76
|
-
*/
|
|
77
|
-
export declare function getApiRequestMethodName(id: string): string;
|
|
1
|
+
import { JSONObject } from '@alilc/lowcode-datasource-types/src/value-type';
|
|
2
|
+
import { InterpretDataSourceConfig } from '@alilc/lowcode-types';
|
|
3
|
+
import { DataSourceCustomExtra, ExtraInterpretDataSource } from '../types';
|
|
4
|
+
export declare const PREFIX_API_CACHE = "page_cache_";
|
|
5
|
+
export declare const PREFIX_PAGE_NUM = "_nowPage";
|
|
6
|
+
export declare const PREFIX_IS_LAST_PAGE = "_isLastPage";
|
|
7
|
+
export declare const PREFIX_API_PARAM_NAME = "Params";
|
|
8
|
+
export declare const SUFFIX_API_SCRIPT = "Request";
|
|
9
|
+
export declare const SUFFIX_DATA_SOURCE_MAP = "dataSourceMap";
|
|
10
|
+
export declare const SUFFIX_API_METHOD = "Method";
|
|
11
|
+
export declare const GLOBE_API_PARAM = "globeParam";
|
|
12
|
+
export type TypeDataSourceType = 'dynamicForm' | 'dataDictionary' | 'dynamicFormCache' | 'dynamicFormDetail' | 'dataLoginUserInfo';
|
|
13
|
+
/**
|
|
14
|
+
* 请求头处理
|
|
15
|
+
* @param headers 请求头
|
|
16
|
+
*/
|
|
17
|
+
export declare function requestHeaderHandler(headers: JSONObject): string;
|
|
18
|
+
/**
|
|
19
|
+
* 请求体处理
|
|
20
|
+
* @param params 请求体
|
|
21
|
+
*/
|
|
22
|
+
export declare function requestParamsHandler(params: JSONObject): string;
|
|
23
|
+
/**
|
|
24
|
+
* 请求结果处理
|
|
25
|
+
*/
|
|
26
|
+
export declare function requestAfterDataHandler(dataSourceItems: InterpretDataSourceConfig, extra: Record<string, DataSourceCustomExtra>): string[];
|
|
27
|
+
/**
|
|
28
|
+
* 是否是js表达式
|
|
29
|
+
* @param value
|
|
30
|
+
*/
|
|
31
|
+
export declare function isJsExpression(value: any): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 将线上地址转为出码后的请求地址
|
|
34
|
+
* @param dataSourceConfig
|
|
35
|
+
* @param extra 额外参数
|
|
36
|
+
*/
|
|
37
|
+
export declare function handleUrl(dataSourceConfig: InterpretDataSourceConfig, extra: any): string;
|
|
38
|
+
/**
|
|
39
|
+
* 处理分页请求参数
|
|
40
|
+
* 将分页参数转换为ref(pageNum和isLastPage)
|
|
41
|
+
*/
|
|
42
|
+
export declare function handlePageParamToRef(data: ExtraInterpretDataSource): string[];
|
|
43
|
+
/**
|
|
44
|
+
* 将请求参数itemList里面的this.state.xxx 都包裹进reactive里面
|
|
45
|
+
* @param data
|
|
46
|
+
*/
|
|
47
|
+
export declare function handleParamToRef(data: ExtraInterpretDataSource): string[];
|
|
48
|
+
/**
|
|
49
|
+
* 将API转换为ref变量
|
|
50
|
+
* @param data
|
|
51
|
+
*/
|
|
52
|
+
export declare function handleApiToRef(data: ExtraInterpretDataSource): string[];
|
|
53
|
+
/**
|
|
54
|
+
* 获取数据源的id
|
|
55
|
+
* @param id
|
|
56
|
+
* @param extra
|
|
57
|
+
*/
|
|
58
|
+
export declare function getApiId(id: string, extra: Record<string, DataSourceCustomExtra>): string;
|
|
59
|
+
/**
|
|
60
|
+
* 获取请求参数名字
|
|
61
|
+
* @param id
|
|
62
|
+
*/
|
|
63
|
+
export declare function getApiParamName(id: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* 获取请求后置处理方法名
|
|
66
|
+
* @param id
|
|
67
|
+
*/
|
|
68
|
+
export declare function getApiHandleFunctionName(id: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* 获取script 里引入的api名称
|
|
71
|
+
*/
|
|
72
|
+
export declare function getApiName(apiId: string): string;
|
|
73
|
+
/**
|
|
74
|
+
* 获取api请求方法名
|
|
75
|
+
* @param id
|
|
76
|
+
*/
|
|
77
|
+
export declare function getApiRequestMethodName(id: string): string;
|