@cloudbase/cals 0.4.0 → 0.4.1
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/lib/parser/cals/index.d.ts +7 -12
- package/lib/parser/cals/index.d.ts.map +1 -1
- package/lib/parser/cals/index.js +37 -1
- package/lib/parser/cals/utils/block/index.d.ts +0 -0
- package/lib/parser/cals/utils/block/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/block/index.js +0 -0
- package/lib/parser/cals/utils/code/index.d.ts +0 -0
- package/lib/parser/cals/utils/code/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/code/index.js +0 -0
- package/lib/parser/cals/utils/common.d.ts +0 -0
- package/lib/parser/cals/utils/common.d.ts.map +0 -0
- package/lib/parser/cals/utils/common.js +0 -0
- package/lib/parser/cals/utils/runtime.d.ts +0 -0
- package/lib/parser/cals/utils/runtime.d.ts.map +0 -0
- package/lib/parser/cals/utils/runtime.js +0 -0
- package/lib/parser/cals/utils/spinoff/index.d.ts +0 -0
- package/lib/parser/cals/utils/spinoff/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/spinoff/index.js +0 -0
- package/lib/parser/cals/utils/style.d.ts +0 -0
- package/lib/parser/cals/utils/style.d.ts.map +0 -0
- package/lib/parser/cals/utils/style.js +0 -0
- package/lib/parser/cals/utils/template.d.ts +5 -0
- package/lib/parser/cals/utils/template.d.ts.map +1 -0
- package/lib/parser/cals/utils/template.js +227 -0
- package/lib/parser/cals/utils/version/common.d.ts +0 -0
- package/lib/parser/cals/utils/version/common.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/common.js +0 -0
- package/lib/parser/cals/utils/version/config.d.ts +0 -0
- package/lib/parser/cals/utils/version/config.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/config.js +0 -0
- package/lib/parser/cals/utils/version/index.d.ts +0 -0
- package/lib/parser/cals/utils/version/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/index.js +0 -0
- package/lib/parser/cals/utils/version/parses.d.ts +0 -0
- package/lib/parser/cals/utils/version/parses.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/parses.js +0 -0
- package/lib/parser/cals/utils/version/utils.d.ts +0 -0
- package/lib/parser/cals/utils/version/utils.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/utils.js +0 -0
- package/lib/parser/expression/index.d.ts +0 -0
- package/lib/parser/expression/index.d.ts.map +0 -0
- package/lib/parser/expression/index.js +0 -0
- package/lib/parser/index.d.ts +0 -0
- package/lib/parser/index.d.ts.map +0 -0
- package/lib/parser/index.js +0 -0
- package/lib/types/basic/app.d.ts +0 -0
- package/lib/types/basic/app.d.ts.map +0 -0
- package/lib/types/basic/app.js +0 -0
- package/lib/types/basic/common.d.ts +0 -0
- package/lib/types/basic/common.d.ts.map +0 -0
- package/lib/types/basic/common.js +0 -0
- package/lib/types/basic/component.d.ts +0 -0
- package/lib/types/basic/component.d.ts.map +0 -0
- package/lib/types/basic/component.js +0 -0
- package/lib/types/basic/datasource.d.ts +0 -0
- package/lib/types/basic/datasource.d.ts.map +0 -0
- package/lib/types/basic/datasource.js +0 -0
- package/lib/types/index.d.ts +0 -0
- package/lib/types/index.d.ts.map +0 -0
- package/lib/types/index.js +0 -0
- package/lib/types/lcds.d.ts +0 -0
- package/lib/types/lcds.d.ts.map +0 -0
- package/lib/types/lcds.js +0 -0
- package/lib/types/platform/app.d.ts +0 -0
- package/lib/types/platform/app.d.ts.map +0 -0
- package/lib/types/platform/app.js +0 -0
- package/lib/types/platform/common.d.ts +31 -0
- package/lib/types/platform/common.d.ts.map +1 -1
- package/lib/types/platform/common.js +33 -1
- package/lib/types/platform/component.d.ts +0 -0
- package/lib/types/platform/component.d.ts.map +0 -0
- package/lib/types/platform/component.js +0 -0
- package/lib/types/platform/datasource.d.ts +0 -0
- package/lib/types/platform/datasource.d.ts.map +0 -0
- package/lib/types/platform/datasource.js +0 -0
- package/lib/types/platform/widget/form.d.ts +0 -0
- package/lib/types/platform/widget/form.d.ts.map +0 -0
- package/lib/types/platform/widget/form.js +0 -0
- package/lib/types/platform/widget/meta.d.ts +0 -0
- package/lib/types/platform/widget/meta.d.ts.map +0 -0
- package/lib/types/platform/widget/meta.js +0 -0
- package/lib/utils/build.d.ts +0 -0
- package/lib/utils/build.d.ts.map +0 -0
- package/lib/utils/build.js +0 -0
- package/lib/utils/constant.d.ts +0 -0
- package/lib/utils/constant.d.ts.map +0 -0
- package/lib/utils/constant.js +0 -0
- package/lib/utils/index.d.ts +0 -0
- package/lib/utils/index.d.ts.map +0 -0
- package/lib/utils/index.js +0 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { IAttributes, IPlatformApp, IComplexComponent, IBasicComponent, IPageCom
|
|
|
2
2
|
IPlatformDataSource, IDependencies, LCDS } from '../../types';
|
|
3
3
|
import { IDynamicValue, PropBindType } from '../expression';
|
|
4
4
|
export { getUsedComps } from './utils/common';
|
|
5
|
+
export { generateDefaultCode } from './utils/template';
|
|
5
6
|
interface IDeserializeContext {
|
|
6
7
|
app?: IPlatformApp;
|
|
7
8
|
dependencies?: any[];
|
|
@@ -151,10 +152,7 @@ export declare function deserializePage(ctx: {
|
|
|
151
152
|
type: string;
|
|
152
153
|
code: string;
|
|
153
154
|
description?: string;
|
|
154
|
-
path?: string;
|
|
155
|
-
* 依赖描述
|
|
156
|
-
* map 由 数组处理得到
|
|
157
|
-
*/
|
|
155
|
+
path?: string;
|
|
158
156
|
name: string;
|
|
159
157
|
}[];
|
|
160
158
|
listeners: {
|
|
@@ -224,10 +222,7 @@ export declare function deserializePlatformApp(data: IPlatformApp, optsions: {
|
|
|
224
222
|
type: string;
|
|
225
223
|
code: string;
|
|
226
224
|
description?: string;
|
|
227
|
-
path?: string;
|
|
228
|
-
* 依赖描述
|
|
229
|
-
* map 由 数组处理得到
|
|
230
|
-
*/
|
|
225
|
+
path?: string;
|
|
231
226
|
name: string;
|
|
232
227
|
}[];
|
|
233
228
|
listeners: {
|
|
@@ -249,10 +244,7 @@ export declare function deserializePlatformApp(data: IPlatformApp, optsions: {
|
|
|
249
244
|
type: string;
|
|
250
245
|
code: string;
|
|
251
246
|
description?: string;
|
|
252
|
-
path?: string;
|
|
253
|
-
* 依赖描述
|
|
254
|
-
* map 由 数组处理得到
|
|
255
|
-
*/
|
|
247
|
+
path?: string;
|
|
256
248
|
name: string;
|
|
257
249
|
}[];
|
|
258
250
|
datasources: IPlatformDataSource[];
|
|
@@ -355,4 +347,7 @@ export declare function deserializeComponentLibraryMeta(meta: {
|
|
|
355
347
|
};
|
|
356
348
|
};
|
|
357
349
|
};
|
|
350
|
+
export declare function processRuntimeCodeResources(ctx: {
|
|
351
|
+
id: string;
|
|
352
|
+
}, resources: any[], scope: string): any[];
|
|
358
353
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/parser/cals/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,cAAc,EAGd,mBAAmB,EACnB,cAAc,EAAE,cAAc;AAC9B,mBAAmB,EACnB,aAAa,EACb,IAAI,EACL,MAAM,aAAa,CAAC;AAErB,OAAO,EAAkC,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/parser/cals/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,cAAc,EAGd,mBAAmB,EACnB,cAAc,EAAE,cAAc;AAC9B,mBAAmB,EACnB,aAAa,EACb,IAAI,EACL,MAAM,aAAa,CAAC;AAErB,OAAO,EAAkC,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgB5F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM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AAE,CAAC;CAC1C;;;;;;;mBAIY,MAAM;mBACN,MAAM;sBACH,MAAM;;;6BACwB,OAAO;;;wBACnC,MAAM;;;EA8BvB;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,SAAS,OAAyB,EAAE,KAAK,EAAE,MAAM,SAiCjH"}
|
package/lib/parser/cals/index.js
CHANGED
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.deserializeComponentLibraryMeta = exports.deserializeRuntimeComponent = exports.serializeRuntimeComponent = exports.serializeRuntimePage = exports.deserializePlatformApp = exports.serializePlatformApp = exports.deserializePage = exports.serializePage = exports.deserializeComponent = exports.serializeComponent = exports.deserializeDataVariables = exports.deserializeAttributes = exports.serializeAttributes = exports.deserializeDynamicMap = exports.serializeDynamicMap = exports.deserializeValue = exports.serializeValue = exports.getUsedComps = void 0;
|
|
14
|
+
exports.processRuntimeCodeResources = exports.deserializeComponentLibraryMeta = exports.deserializeRuntimeComponent = exports.serializeRuntimeComponent = exports.serializeRuntimePage = exports.deserializePlatformApp = exports.serializePlatformApp = exports.deserializePage = exports.serializePage = exports.deserializeComponent = exports.serializeComponent = exports.deserializeDataVariables = exports.deserializeAttributes = exports.serializeAttributes = exports.deserializeDynamicMap = exports.serializeDynamicMap = exports.deserializeValue = exports.serializeValue = exports.generateDefaultCode = exports.getUsedComps = void 0;
|
|
15
15
|
const lodash_1 = require("lodash");
|
|
16
16
|
const common_1 = require("../../types/platform/common");
|
|
17
17
|
const expression_1 = require("../expression");
|
|
@@ -19,8 +19,11 @@ const common_2 = require("./utils/common");
|
|
|
19
19
|
const style_1 = require("./utils/style");
|
|
20
20
|
const runtime_1 = require("./utils/runtime");
|
|
21
21
|
const config_1 = require("./utils/version/config");
|
|
22
|
+
const template_1 = require("./utils/template");
|
|
22
23
|
var common_3 = require("./utils/common");
|
|
23
24
|
Object.defineProperty(exports, "getUsedComps", { enumerable: true, get: function () { return common_3.getUsedComps; } });
|
|
25
|
+
var template_2 = require("./utils/template");
|
|
26
|
+
Object.defineProperty(exports, "generateDefaultCode", { enumerable: true, get: function () { return template_2.generateDefaultCode; } });
|
|
24
27
|
function serializeValue({ ctx, key, dynamicValue, scope = 'page', streamlineDefaultValue, }) {
|
|
25
28
|
var _a, _b;
|
|
26
29
|
let { value } = dynamicValue;
|
|
@@ -1034,3 +1037,36 @@ function deserializeComponentLibraryMeta(meta) {
|
|
|
1034
1037
|
dependencies, components: processedComponents });
|
|
1035
1038
|
}
|
|
1036
1039
|
exports.deserializeComponentLibraryMeta = deserializeComponentLibraryMeta;
|
|
1040
|
+
function processRuntimeCodeResources(ctx, resources /* : IWeappCode[]*/ = [], scope) {
|
|
1041
|
+
const { id } = ctx;
|
|
1042
|
+
const fileTypes = [common_1.ECodeType.STYLE, common_1.ECodeType.STATE, common_1.ECodeType.LIFECYCLE, common_1.ECodeType.COMPUTEDN];
|
|
1043
|
+
const CODE_TYPE_NAME_MAP = {
|
|
1044
|
+
[common_1.ECodeType.STATE]: common_1.ECodeName.STATE,
|
|
1045
|
+
[common_1.ECodeType.COMPUTEDN]: common_1.ECodeName.COMPUTEDN,
|
|
1046
|
+
[common_1.ECodeType.STYLE]: common_1.ECodeName.STYLE,
|
|
1047
|
+
[common_1.ECodeType.LIFECYCLE]: common_1.ECodeName.LIFECYCLE,
|
|
1048
|
+
};
|
|
1049
|
+
const isComponent = id === '$comp' || scope === 'component';
|
|
1050
|
+
if (id === 'global' || scope === 'app') {
|
|
1051
|
+
fileTypes.push(common_1.ECodeType.THEME);
|
|
1052
|
+
}
|
|
1053
|
+
const EXIST_FILE_TYPE_MAP = {};
|
|
1054
|
+
resources.forEach((mod) => {
|
|
1055
|
+
EXIST_FILE_TYPE_MAP[mod.type] = true;
|
|
1056
|
+
});
|
|
1057
|
+
fileTypes.forEach((type) => {
|
|
1058
|
+
const isHasLowcodeIndex = EXIST_FILE_TYPE_MAP[type];
|
|
1059
|
+
if (!isHasLowcodeIndex) {
|
|
1060
|
+
const name = CODE_TYPE_NAME_MAP[type] || type;
|
|
1061
|
+
resources.unshift({
|
|
1062
|
+
name,
|
|
1063
|
+
type,
|
|
1064
|
+
code: (0, template_1.generateDefaultCode)(ctx, type, isComponent ? 'component' : id === 'global' ? 'app' : 'page'),
|
|
1065
|
+
path: `${id}/${name}`,
|
|
1066
|
+
system: true,
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
return resources.filter((m) => m.name !== common_1.ECodeName.PLACEHOLDER);
|
|
1071
|
+
}
|
|
1072
|
+
exports.processRuntimeCodeResources = processRuntimeCodeResources;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../../src/parser/cals/utils/template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoM3C,wBAAgB,mBAAmB,CAAC,GAAG,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,GAAG,MAAM,GAAG,KAAK,UA2B5G"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.generateDefaultCode = void 0;
|
|
7
|
+
const template_1 = __importDefault(require("lodash/template"));
|
|
8
|
+
const types_1 = require("../../../types");
|
|
9
|
+
const TEMPLATES = {
|
|
10
|
+
/* ========== 低代码简化类型代码 ========== */
|
|
11
|
+
// 应用生命周期
|
|
12
|
+
appLifeCycle: `/**
|
|
13
|
+
* 可通过 app 获取或修改全局应用的 变量 状态 等信息
|
|
14
|
+
* 具体可以console.info 在编辑器Console面板查看更多信息
|
|
15
|
+
* 如果需要 async-await,请在方法前 async
|
|
16
|
+
**/
|
|
17
|
+
export default {
|
|
18
|
+
onAppLaunch(launchOpts) {
|
|
19
|
+
//console.log('---------> LifeCycle onAppLaunch', launchOpts)
|
|
20
|
+
},
|
|
21
|
+
onAppShow(appShowOpts) {
|
|
22
|
+
//console.log('---------> LifeCycle onAppShow', appShowOpts)
|
|
23
|
+
},
|
|
24
|
+
onAppHide() {
|
|
25
|
+
//console.log('---------> LifeCycle onAppHide')
|
|
26
|
+
},
|
|
27
|
+
onAppError(options) {
|
|
28
|
+
//console.log('---------> LifeCycle onAppError', options)
|
|
29
|
+
},
|
|
30
|
+
onAppPageNotFound(options) {
|
|
31
|
+
//console.log('---------> LifeCycle onAppPageNotFound', options)
|
|
32
|
+
},
|
|
33
|
+
onAppUnhandledRejection(options) {
|
|
34
|
+
//console.log('---------> LifeCycle onAppUnhandledRejection', options)
|
|
35
|
+
}
|
|
36
|
+
}`,
|
|
37
|
+
// 页面生命周期
|
|
38
|
+
pageLifeCycle: `/*
|
|
39
|
+
* 可通过 $page 获取或修改当前页面的 变量 状态 handler lifecycle 等信息
|
|
40
|
+
* 可通过 app 获取或修改全局应用的 变量 状态 等信息
|
|
41
|
+
* 具体可以 console.info 在编辑器Console面板查看更多信息
|
|
42
|
+
* 如果需要 async-await,请在方法前 async
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
onPageLoad(query) {
|
|
47
|
+
//console.log('---------> LifeCycle onPageLoad', query)
|
|
48
|
+
},
|
|
49
|
+
onPageShow() {
|
|
50
|
+
//console.log('---------> LifeCycle onPageShow')
|
|
51
|
+
},
|
|
52
|
+
onPageReady() {
|
|
53
|
+
//console.log('---------> LifeCycle onPageReady')
|
|
54
|
+
},
|
|
55
|
+
onPageHide() {
|
|
56
|
+
//console.log('---------> LifeCycle onPageHide')
|
|
57
|
+
},
|
|
58
|
+
onPageUnload() {
|
|
59
|
+
//console.log('---------> LifeCycle onPageUnload')
|
|
60
|
+
},
|
|
61
|
+
}`,
|
|
62
|
+
// 组件生命周期
|
|
63
|
+
compLifeCycle: `export default {
|
|
64
|
+
onAttached() {
|
|
65
|
+
//console.log('---------> LifeCycle onAttached')
|
|
66
|
+
},
|
|
67
|
+
onDetached() {
|
|
68
|
+
//console.log('---------> LifeCycle onDetached')
|
|
69
|
+
},
|
|
70
|
+
}`,
|
|
71
|
+
// 以下为用户可增加的代码类型,所以需要与代码类型一一对应
|
|
72
|
+
// 状态
|
|
73
|
+
[types_1.ECodeType.STATE]: `/*
|
|
74
|
+
* <% if (type === 'app') { %>可通过 app.state.xxx 访问这里定义的状态<% } %><% if (type === 'page') { %>可通过 $page.state.xxx 访问这里定义的状态<% } %><% if (type === 'component') { %>可通过 $comp.state.xxx 访问这里定义的状态<% } %>
|
|
75
|
+
* <% if (type === 'page') { %>注意:页面级别的状态仅在所属的页面有效<% } %>
|
|
76
|
+
* 修改状态时,直接赋值即可。如:<% if (type === 'app') { %>$app.state.xxx = 'xxx'<% } %><% if (type === 'page') { %>$page.state.xxx = 'xxx'<% } %><% if (type === 'component') { %>$comp.state.xxx = 'xxx'<% } %>
|
|
77
|
+
* 请注意:避免在页面处于后台状态时state,页面在后台时对全局state的修改会丢失!
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
<% if (type !== 'component') { %>
|
|
81
|
+
export default {
|
|
82
|
+
name: 'LowCode'
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* 在这里定义页面变量。
|
|
86
|
+
* 页面变量区别于 state 的是:页面变量不会作响应处理,不可被绑定
|
|
87
|
+
* <% if (type === 'page') { %>在 handler 中使用的例子:import { data } from '../state'<% } %>
|
|
88
|
+
* <% if (type === 'app') { %>在 common 中使用的例子:import { data } from '../state'<% } %>
|
|
89
|
+
*/
|
|
90
|
+
export const data = {
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
<% } %>
|
|
94
|
+
<% if (type === 'component') { %>
|
|
95
|
+
export default function() {
|
|
96
|
+
return {
|
|
97
|
+
name: 'LowCode'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
<% } %>
|
|
101
|
+
`,
|
|
102
|
+
// 计算属性
|
|
103
|
+
[types_1.ECodeType.COMPUTEDN]: `
|
|
104
|
+
/*
|
|
105
|
+
* <% if (type === 'app') { %>可通过 app.computed.xxx 访问这里定义的计算状态<% } %><% if (type === 'page') { %>可通过 $page.computed.xxx 访问这里定义的计算状态<% } %><% if (type === 'component') { %>可通过 $comp.computed.xxx 访问这里定义的计算状态<% } %>
|
|
106
|
+
* <% if (type === 'page') { %>注意:页面级别的计算状态仅在所属的页面有效<% } %>
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
export default {
|
|
110
|
+
name() { return 'LowCode' }
|
|
111
|
+
}`,
|
|
112
|
+
// 处理方法-有上下文的方法,相当于小程序的methods,可获取 state,computed 等信息
|
|
113
|
+
[types_1.ECodeType.HANDLER_FN]: `/**
|
|
114
|
+
* <% if (type === 'component') { %>可通过 $comp.handler.xxx 访问这里定义的方法<% } %>
|
|
115
|
+
* <% if (type === 'page') { %>可通过 $page 获取或修改当前页面的 变量 状态 handler lifecycle 等信息<% } %>
|
|
116
|
+
* <% if (type === 'page') { %>可通过 app 获取或修改全局应用的 变量 状态 等信息<% } %>
|
|
117
|
+
* <% if (type === 'page') { %>具体可以console.info 在编辑器Console面板查看更多信息<% } %>
|
|
118
|
+
* <% if (type === 'page') { %>注意:该方法仅在所属的页面有效<% } %>
|
|
119
|
+
* 如果需要 async-await,请修改成 export default async function() {}
|
|
120
|
+
**/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @param {Object} event - 事件对象.
|
|
124
|
+
* @param {string} event.name - 事件名.
|
|
125
|
+
* @param {string} event.target - 事件的目标节点(触发该事件的节点).
|
|
126
|
+
* @param {string} event.currentTarget - 当前处理该事件的节点。包括冒泡和捕获事件。.
|
|
127
|
+
*
|
|
128
|
+
* @param {Object} data
|
|
129
|
+
* @param {any} data.target - 获取事件传参的数据
|
|
130
|
+
**/
|
|
131
|
+
export default function({event, data}) {
|
|
132
|
+
|
|
133
|
+
}`,
|
|
134
|
+
// 普通模块-没有上下文,无法直接获取 state 信息
|
|
135
|
+
[types_1.ECodeType.NORMAL_MODULE]: `
|
|
136
|
+
/*
|
|
137
|
+
* 函数里面访问:通过 app.common.[name].xxx 访问这里定义的方法或值
|
|
138
|
+
* 函数外面访问:通过 import(如在页面的 handler 引用的例子:import { xxx } from '../../common/[name]')
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
export function sayHi() {
|
|
142
|
+
console.log('Hi LowCode')
|
|
143
|
+
}
|
|
144
|
+
`,
|
|
145
|
+
// 样式
|
|
146
|
+
[types_1.ECodeType.STYLE]: `
|
|
147
|
+
<% if (type !== 'component') { %>
|
|
148
|
+
/**
|
|
149
|
+
* 可以使用theme中定义的 mixin 和 定义变量
|
|
150
|
+
**/
|
|
151
|
+
<% } else {%>
|
|
152
|
+
/**
|
|
153
|
+
* 使用less书写样式
|
|
154
|
+
* */
|
|
155
|
+
<% } %>
|
|
156
|
+
<%= type === 'component' ? '&':'' %>.<%= type === 'component' ? type: id%>-class-name {
|
|
157
|
+
<% if (type === 'app') { %>// 使用样式变量<% } %>
|
|
158
|
+
// 使用theme中的变量
|
|
159
|
+
// color: <% if (type === 'app' || type === 'page') { %>@example-primary-color<% } %><% if (type === 'component') { %>blue<% } %>;
|
|
160
|
+
|
|
161
|
+
// 默认 px 会转换成 rem,含大写字母 PX 和 Px 则不会转换
|
|
162
|
+
// margin-top: 20px;
|
|
163
|
+
// 使用theme中的混合(mixins)
|
|
164
|
+
// <%= type === 'component' ? '':'.mixins();' %>
|
|
165
|
+
// 可写嵌套样式
|
|
166
|
+
.<%= type === 'component' ? type: id%>-nest-class {
|
|
167
|
+
// color: #fff;
|
|
168
|
+
// 使用theme中的混合(mixins)
|
|
169
|
+
// <%= type === 'component' ? '':'.mixins(green);' %>
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
`,
|
|
173
|
+
[types_1.ECodeType.THEME]: `@example-primary-color: blue;`,
|
|
174
|
+
[types_1.ECodeType.MPCONFIG]: `export default {
|
|
175
|
+
appJson: {
|
|
176
|
+
// 小程序接口权限相关设置,可选
|
|
177
|
+
/* permission: {
|
|
178
|
+
'scope.userLocation': {
|
|
179
|
+
desc: '你的位置信息将用于小程序位置接口的效果展示',
|
|
180
|
+
},
|
|
181
|
+
}, */
|
|
182
|
+
},
|
|
183
|
+
}
|
|
184
|
+
`,
|
|
185
|
+
[types_1.ECodeType.RENDERER]: `/**
|
|
186
|
+
* 可通过 $page 获取或修改当前页面的 变量 状态 handler lifecycle 等信息
|
|
187
|
+
* 可通过 app 获取或修改全局应用的 变量 状态 等信息
|
|
188
|
+
* 具体可以console.info 在编辑器Console面板查看更多信息
|
|
189
|
+
* 注意:该方法仅在所属的页面有效
|
|
190
|
+
**/
|
|
191
|
+
|
|
192
|
+
import * as React from 'react';
|
|
193
|
+
import * as ReactDOM from 'react-dom';
|
|
194
|
+
|
|
195
|
+
export default function(props) {
|
|
196
|
+
return <div>自定义渲染</div>
|
|
197
|
+
}`,
|
|
198
|
+
};
|
|
199
|
+
function generateDefaultCode(ctx, type, scope) {
|
|
200
|
+
const { id } = ctx;
|
|
201
|
+
const data = {
|
|
202
|
+
type: scope,
|
|
203
|
+
id,
|
|
204
|
+
};
|
|
205
|
+
switch (type) {
|
|
206
|
+
case types_1.ECodeType.LIFECYCLE: {
|
|
207
|
+
let tpl = '';
|
|
208
|
+
switch (scope) {
|
|
209
|
+
case 'component':
|
|
210
|
+
tpl = TEMPLATES.compLifeCycle;
|
|
211
|
+
break;
|
|
212
|
+
case 'page':
|
|
213
|
+
tpl = TEMPLATES.pageLifeCycle;
|
|
214
|
+
break;
|
|
215
|
+
case 'app':
|
|
216
|
+
tpl = TEMPLATES.appLifeCycle;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
return (0, template_1.default)(tpl)(data);
|
|
220
|
+
}
|
|
221
|
+
default: {
|
|
222
|
+
const tpl = TEMPLATES[type] || 'epxort default {}';
|
|
223
|
+
return (0, template_1.default)(tpl)(data);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
exports.generateDefaultCode = generateDefaultCode;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/parser/index.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/parser/index.js
CHANGED
|
File without changes
|
package/lib/types/basic/app.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/types/basic/app.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/types/index.d.ts
CHANGED
|
File without changes
|
package/lib/types/index.d.ts.map
CHANGED
|
File without changes
|
package/lib/types/index.js
CHANGED
|
File without changes
|
package/lib/types/lcds.d.ts
CHANGED
|
File without changes
|
package/lib/types/lcds.d.ts.map
CHANGED
|
File without changes
|
package/lib/types/lcds.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -58,6 +58,37 @@ export declare enum ECodeType {
|
|
|
58
58
|
*/
|
|
59
59
|
RENDERER = "renderer"
|
|
60
60
|
}
|
|
61
|
+
export declare enum ECodeName {
|
|
62
|
+
LIFECYCLE = "lifecycle",
|
|
63
|
+
CONFIG = "config",
|
|
64
|
+
STATE = "state",
|
|
65
|
+
COMPUTEDN = "computed",
|
|
66
|
+
STYLE = "style",
|
|
67
|
+
THEME = "theme",
|
|
68
|
+
/**
|
|
69
|
+
* 小程序全局配置
|
|
70
|
+
*/
|
|
71
|
+
MPCONFIG = "mp_config",
|
|
72
|
+
/**
|
|
73
|
+
* 目录
|
|
74
|
+
* jsx 类型,渲染器
|
|
75
|
+
*/
|
|
76
|
+
RENDERER = "renderer",
|
|
77
|
+
/**
|
|
78
|
+
* 目录
|
|
79
|
+
* 处理方法,用于处理页面级别的逻辑。拥有页面实例上下文,如可取得 state 状态 page/hanlder
|
|
80
|
+
*/
|
|
81
|
+
HANDLER_FN = "handler",
|
|
82
|
+
/**
|
|
83
|
+
* 目录
|
|
84
|
+
*/
|
|
85
|
+
NORMAL_MODULE = "common",
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated
|
|
88
|
+
* 用于占位,保证目录有文件。在处理的时候可对此类文件进行隐藏
|
|
89
|
+
*/
|
|
90
|
+
PLACEHOLDER = "____index____"
|
|
91
|
+
}
|
|
61
92
|
export interface ICodeResource extends Basic.IResource {
|
|
62
93
|
/**
|
|
63
94
|
* 资源类型
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/platform/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,SAAS;AACT,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,QAAQ;IACtD,SAAS;IACT,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,GAAG,mBAAmB,CAAC,CAAC;IACnE,eAAe;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CAChD;AAED;;GAEG;AACH,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX,oBAAY,SAAS;IACnB;;OAEG;IACH,SAAS,cAAc;IACvB;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,SAAS,aAAa;IACtB;;;OAGG;IACH,UAAU,eAAe;IACzB;;;OAGG;IACH,aAAa,kBAAkB;IAC/B;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,QAAQ,cAAc;IACtB;;OAEG;IACH,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,SAAS;IACpD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,SAAS;IACvD,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,SAAS;IACxD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,qBAAqB,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC;KAChD,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/platform/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,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M,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,SAAS;IACvD,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,SAAS;IACxD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,qBAAqB,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAC;KAChD,CAAC;CACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ECodeType = exports.EResourceType = void 0;
|
|
3
|
+
exports.ECodeName = exports.ECodeType = exports.EResourceType = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* 资源类型
|
|
6
6
|
*/
|
|
@@ -53,3 +53,35 @@ var ECodeType;
|
|
|
53
53
|
*/
|
|
54
54
|
ECodeType["RENDERER"] = "renderer";
|
|
55
55
|
})(ECodeType = exports.ECodeType || (exports.ECodeType = {}));
|
|
56
|
+
var ECodeName;
|
|
57
|
+
(function (ECodeName) {
|
|
58
|
+
ECodeName["LIFECYCLE"] = "lifecycle";
|
|
59
|
+
ECodeName["CONFIG"] = "config";
|
|
60
|
+
ECodeName["STATE"] = "state";
|
|
61
|
+
ECodeName["COMPUTEDN"] = "computed";
|
|
62
|
+
ECodeName["STYLE"] = "style";
|
|
63
|
+
ECodeName["THEME"] = "theme";
|
|
64
|
+
/**
|
|
65
|
+
* 小程序全局配置
|
|
66
|
+
*/
|
|
67
|
+
ECodeName["MPCONFIG"] = "mp_config";
|
|
68
|
+
/**
|
|
69
|
+
* 目录
|
|
70
|
+
* jsx 类型,渲染器
|
|
71
|
+
*/
|
|
72
|
+
ECodeName["RENDERER"] = "renderer";
|
|
73
|
+
/**
|
|
74
|
+
* 目录
|
|
75
|
+
* 处理方法,用于处理页面级别的逻辑。拥有页面实例上下文,如可取得 state 状态 page/hanlder
|
|
76
|
+
*/
|
|
77
|
+
ECodeName["HANDLER_FN"] = "handler";
|
|
78
|
+
/**
|
|
79
|
+
* 目录
|
|
80
|
+
*/
|
|
81
|
+
ECodeName["NORMAL_MODULE"] = "common";
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated
|
|
84
|
+
* 用于占位,保证目录有文件。在处理的时候可对此类文件进行隐藏
|
|
85
|
+
*/
|
|
86
|
+
ECodeName["PLACEHOLDER"] = "____index____";
|
|
87
|
+
})(ECodeName = exports.ECodeName || (exports.ECodeName = {}));
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/utils/build.d.ts
CHANGED
|
File without changes
|
package/lib/utils/build.d.ts.map
CHANGED
|
File without changes
|
package/lib/utils/build.js
CHANGED
|
File without changes
|
package/lib/utils/constant.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/utils/constant.js
CHANGED
|
File without changes
|
package/lib/utils/index.d.ts
CHANGED
|
File without changes
|
package/lib/utils/index.d.ts.map
CHANGED
|
File without changes
|
package/lib/utils/index.js
CHANGED
|
File without changes
|