@cloudbase/cals 1.0.3-alpha.6 → 1.0.3-alpha.8
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/cloudbase.cals.umd.min.js +5 -0
- package/lib/parser/cals/index.d.ts +366 -371
- package/lib/parser/cals/index.d.ts.map +1 -1
- package/lib/parser/cals/index.js +12 -12
- package/lib/parser/cals/utils/block/index.d.ts +14 -14
- package/lib/parser/cals/utils/block/index.js +3 -3
- package/lib/parser/cals/utils/code/index.d.ts +30 -30
- package/lib/parser/cals/utils/code/index.js +13 -12
- package/lib/parser/cals/utils/common.d.ts +11 -11
- package/lib/parser/cals/utils/runtime.d.ts +13 -13
- package/lib/parser/cals/utils/runtime.d.ts.map +1 -1
- package/lib/parser/cals/utils/runtime.js +2 -2
- package/lib/parser/cals/utils/spinoff/index.d.ts +9 -9
- package/lib/parser/cals/utils/style.d.ts +42 -42
- package/lib/parser/cals/utils/style.d.ts.map +1 -1
- package/lib/parser/cals/utils/style.js +3 -3
- package/lib/parser/cals/utils/template.d.ts +5 -5
- package/lib/parser/cals/utils/template.js +3 -6
- package/lib/parser/cals/utils/version/common.d.ts +4 -4
- package/lib/parser/cals/utils/version/common.js +11 -34
- package/lib/parser/cals/utils/version/config.d.ts +13 -13
- package/lib/parser/cals/utils/version/index.d.ts +2 -2
- package/lib/parser/cals/utils/version/parses.d.ts +15 -15
- package/lib/parser/cals/utils/version/parses.js +14 -37
- package/lib/parser/cals/utils/version/utils.d.ts +13 -13
- package/lib/parser/cals/utils/version/utils.d.ts.map +1 -1
- package/lib/parser/cals/utils/version/utils.js +2 -2
- package/lib/parser/expression/index.d.ts +122 -122
- package/lib/parser/index.d.ts +8 -8
- package/lib/parser/plugins/postcss-rpx2clac.d.ts +17 -17
- package/lib/parser/plugins/postcss-rpx2clac.js +2 -2
- package/lib/types/basic/app.d.ts +72 -72
- package/lib/types/basic/common.d.ts +88 -88
- package/lib/types/basic/component.d.ts +208 -208
- package/lib/types/basic/datasource.d.ts +49 -49
- package/lib/types/index.d.ts +9 -9
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +14 -1
- package/lib/types/lcds.d.ts +447 -197
- package/lib/types/lcds.d.ts.map +1 -1
- package/lib/types/platform/app.d.ts +176 -176
- package/lib/types/platform/common.d.ts +137 -137
- package/lib/types/platform/component.d.ts +140 -140
- package/lib/types/platform/datasource.d.ts +466 -466
- package/lib/types/platform/widget/form.d.ts +89 -89
- package/lib/types/platform/widget/meta.d.ts +59 -59
- package/lib/utils/CSSProperty.d.ts +63 -63
- package/lib/utils/build.d.ts +1 -1
- package/lib/utils/build.js +3 -6
- package/lib/utils/constant.d.ts +40 -40
- package/lib/utils/dts/auto-generated.d.ts +1 -1
- package/lib/utils/dts/auto-generated.d.ts.map +1 -1
- package/lib/utils/dts/auto-generated.js +1 -1
- package/lib/utils/dts/build.d.ts +1 -1
- package/lib/utils/dts/index.d.ts +130 -130
- package/lib/utils/dts/index.d.ts.map +1 -1
- package/lib/utils/dts/index.js +116 -78
- package/lib/utils/index.d.ts +7 -7
- package/lib/utils/version/common.d.ts +2 -2
- package/lib/utils/version/featureChecker.d.ts +2 -2
- package/lib/utils/version/featureChecker.d.ts.map +1 -1
- package/lib/utils/version/migrations/version4.d.ts +2 -2
- package/lib/utils/version/migrations/version4.js +2 -2
- package/package.json +12 -3
- package/lib/utils/version-migrations/common.d.ts +0 -5
- package/lib/utils/version-migrations/common.d.ts.map +0 -1
- package/lib/utils/version-migrations/common.js +0 -29
- package/lib/utils/version-migrations/version4.d.ts +0 -3
- package/lib/utils/version-migrations/version4.d.ts.map +0 -1
- package/lib/utils/version-migrations/version4.js +0 -199
|
@@ -1,177 +1,177 @@
|
|
|
1
|
-
import * as Basic from '../basic/app';
|
|
2
|
-
import { ICodeResource, IPlatformDataset } from './common';
|
|
3
|
-
import { IPageComponent } from './component';
|
|
4
|
-
import { IDataSourceVariable, IPlatformDataSource } from './datasource';
|
|
5
|
-
import { IEvents } from '../basic/component';
|
|
6
|
-
export declare enum EExternalResourceType {
|
|
7
|
-
JSUrl = "jsUrl",
|
|
8
|
-
CSSUrl = "cssUrl",
|
|
9
|
-
CSSText = "cssText",
|
|
10
|
-
JSText = "jsText",
|
|
11
|
-
Bundle = "bundle"
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 云开发低码平台应用
|
|
15
|
-
*/
|
|
16
|
-
export interface IPlatformApp extends Omit<Basic.IApp, 'attributes' | 'events' | 'listeners' | 'items' | 'resources'> {
|
|
17
|
-
/**
|
|
18
|
-
* 必填, 应用的组件集合
|
|
19
|
-
*/
|
|
20
|
-
items: IPageComponent[];
|
|
21
|
-
/**
|
|
22
|
-
* 可选, 数据源集合
|
|
23
|
-
*/
|
|
24
|
-
dataSources?: IPlatformDataSource[];
|
|
25
|
-
/**
|
|
26
|
-
* 可选, 变量集合
|
|
27
|
-
*/
|
|
28
|
-
dataset?: IPlatformDataset;
|
|
29
|
-
/**
|
|
30
|
-
* 可选, 数据源变量集合
|
|
31
|
-
*
|
|
32
|
-
* @deprecated
|
|
33
|
-
*/
|
|
34
|
-
dataVariables?: IDataSourceVariable[];
|
|
35
|
-
/**
|
|
36
|
-
* 可选,平台特有数据
|
|
37
|
-
*/
|
|
38
|
-
extra?: IPlatformAppExtra;
|
|
39
|
-
/**
|
|
40
|
-
* 可选, 应用的资源集合
|
|
41
|
-
*
|
|
42
|
-
* 应用级别挂载了 code 资源
|
|
43
|
-
*/
|
|
44
|
-
resources?: ICodeResource[];
|
|
45
|
-
/**
|
|
46
|
-
* 应用依赖和依赖对应版本信息,包含组件库,数据源sdk,应用运行时
|
|
47
|
-
* IDependencies
|
|
48
|
-
*/
|
|
49
|
-
dependencies?: IDependencies;
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
externalResources?: IExternalResource[];
|
|
54
|
-
/** 应用所在环境ID */
|
|
55
|
-
envId?: string;
|
|
56
|
-
/** 应用 id */
|
|
57
|
-
id?: string;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* 格式和npm一样
|
|
61
|
-
* 格式:{ '@命名空间/组件库名称': <protocal>:<path>?v=<版本号> } 遵循URL规范
|
|
62
|
-
* 命名空间有:
|
|
63
|
-
* (1) @tcwd。value对应是‘weda:’开头
|
|
64
|
-
* (2) @账户ID。value对应是‘weda:’开头
|
|
65
|
-
* (2) 无命名空间,则认为是npm。value是版本号
|
|
66
|
-
*
|
|
67
|
-
* path代表类型,目前有:
|
|
68
|
-
* (1) components,代表组件库
|
|
69
|
-
* (2) datasources,代表数据源
|
|
70
|
-
* (3) app,应用
|
|
71
|
-
*
|
|
72
|
-
* 例子
|
|
73
|
-
* {
|
|
74
|
-
* "@tcwd/gsd-h5-react": "weda:components?v=1.0.0", // 官方组件库
|
|
75
|
-
* "@304028332/weda_business_ui: : "weda:components?v=1.0.0", // 用户组件库
|
|
76
|
-
* "lodash: "2.1.2", // npm包
|
|
77
|
-
* }
|
|
78
|
-
*/
|
|
79
|
-
export declare type IDependencies = {
|
|
80
|
-
[key: string]: string;
|
|
81
|
-
};
|
|
82
|
-
export interface IPlatformAppExtra {
|
|
83
|
-
/**
|
|
84
|
-
* 应用统一路由模式
|
|
85
|
-
*/
|
|
86
|
-
historyType?: 'HASH' | 'BROWSER';
|
|
87
|
-
/**
|
|
88
|
-
* 额外 npm 依赖
|
|
89
|
-
*/
|
|
90
|
-
npmDependencies?: {
|
|
91
|
-
[key: string]: string;
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* 预设色彩值
|
|
95
|
-
*/
|
|
96
|
-
presetColors?: string[];
|
|
97
|
-
/**
|
|
98
|
-
* 生成自增ID极限范围
|
|
99
|
-
*/
|
|
100
|
-
maxID?: number;
|
|
101
|
-
/**
|
|
102
|
-
* 小程序插件
|
|
103
|
-
*/
|
|
104
|
-
plugins?: {
|
|
105
|
-
title: string;
|
|
106
|
-
name: string;
|
|
107
|
-
module: string;
|
|
108
|
-
type?: 'kbone' | 'mp';
|
|
109
|
-
version: string;
|
|
110
|
-
}[];
|
|
111
|
-
/**
|
|
112
|
-
* 小程序子包名 或 web 子页面路径
|
|
113
|
-
*/
|
|
114
|
-
rootPath?: string | null;
|
|
115
|
-
/**
|
|
116
|
-
* 主题定义
|
|
117
|
-
*/
|
|
118
|
-
themeVars?: {
|
|
119
|
-
[key: string]: string;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* 应用额外定义
|
|
123
|
-
*/
|
|
124
|
-
appConfig?: {};
|
|
125
|
-
/**
|
|
126
|
-
* 小程序插件描述
|
|
127
|
-
*/
|
|
128
|
-
miniprogramPlugins?: {
|
|
129
|
-
name: string;
|
|
130
|
-
version: string;
|
|
131
|
-
pluginAppId: string;
|
|
132
|
-
componentConfigs: (object & {
|
|
133
|
-
isMiniProgramPlugins?: boolean;
|
|
134
|
-
})[];
|
|
135
|
-
}[];
|
|
136
|
-
/**
|
|
137
|
-
* 当前页面静态资源域名(html、图片等静态资源)
|
|
138
|
-
*/
|
|
139
|
-
domain?: string;
|
|
140
|
-
/**
|
|
141
|
-
* 隐藏插槽配置
|
|
142
|
-
*/
|
|
143
|
-
compHiddenConfig?: {
|
|
144
|
-
[pageId: string]: string[];
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
* 基准历史ID
|
|
148
|
-
*/
|
|
149
|
-
originHistoryId?: string;
|
|
150
|
-
/**
|
|
151
|
-
* 组件库上个版本信息。格式为:
|
|
152
|
-
* { @tcwd/CLOUDBASE_BUSSINESS: "weda:components?v=1.22.3&updateTime=1662369434696", @tcwd/CLOUDBASE_STANDARD: "weda:components?v=1.4.2&updateTime=1662369434696"}
|
|
153
|
-
*/
|
|
154
|
-
lastDependencies?: {
|
|
155
|
-
[key: string]: string;
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
export interface IPlatformAppLifeCycle extends IEvents {
|
|
159
|
-
/**
|
|
160
|
-
* 可选,onShow钩子函数名称
|
|
161
|
-
*/
|
|
162
|
-
lifecycleOnShowEventName?: string;
|
|
163
|
-
/**
|
|
164
|
-
* 可选,onHide钩子函数名称
|
|
165
|
-
*/
|
|
166
|
-
lifecycleOnHideEventName?: string;
|
|
167
|
-
/**
|
|
168
|
-
* 可选,onLaunch钩子函数名称
|
|
169
|
-
*/
|
|
170
|
-
lifecycleOnLaunchEventName?: string;
|
|
171
|
-
}
|
|
172
|
-
export interface IExternalResource {
|
|
173
|
-
type: EExternalResourceType;
|
|
174
|
-
url?: string;
|
|
175
|
-
code?: string;
|
|
176
|
-
}
|
|
1
|
+
import * as Basic from '../basic/app';
|
|
2
|
+
import { ICodeResource, IPlatformDataset } from './common';
|
|
3
|
+
import { IPageComponent } from './component';
|
|
4
|
+
import { IDataSourceVariable, IPlatformDataSource } from './datasource';
|
|
5
|
+
import { IEvents } from '../basic/component';
|
|
6
|
+
export declare enum EExternalResourceType {
|
|
7
|
+
JSUrl = "jsUrl",
|
|
8
|
+
CSSUrl = "cssUrl",
|
|
9
|
+
CSSText = "cssText",
|
|
10
|
+
JSText = "jsText",
|
|
11
|
+
Bundle = "bundle"
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 云开发低码平台应用
|
|
15
|
+
*/
|
|
16
|
+
export interface IPlatformApp extends Omit<Basic.IApp, 'attributes' | 'events' | 'listeners' | 'items' | 'resources'> {
|
|
17
|
+
/**
|
|
18
|
+
* 必填, 应用的组件集合
|
|
19
|
+
*/
|
|
20
|
+
items: IPageComponent[];
|
|
21
|
+
/**
|
|
22
|
+
* 可选, 数据源集合
|
|
23
|
+
*/
|
|
24
|
+
dataSources?: IPlatformDataSource[];
|
|
25
|
+
/**
|
|
26
|
+
* 可选, 变量集合
|
|
27
|
+
*/
|
|
28
|
+
dataset?: IPlatformDataset;
|
|
29
|
+
/**
|
|
30
|
+
* 可选, 数据源变量集合
|
|
31
|
+
*
|
|
32
|
+
* @deprecated
|
|
33
|
+
*/
|
|
34
|
+
dataVariables?: IDataSourceVariable[];
|
|
35
|
+
/**
|
|
36
|
+
* 可选,平台特有数据
|
|
37
|
+
*/
|
|
38
|
+
extra?: IPlatformAppExtra;
|
|
39
|
+
/**
|
|
40
|
+
* 可选, 应用的资源集合
|
|
41
|
+
*
|
|
42
|
+
* 应用级别挂载了 code 资源
|
|
43
|
+
*/
|
|
44
|
+
resources?: ICodeResource[];
|
|
45
|
+
/**
|
|
46
|
+
* 应用依赖和依赖对应版本信息,包含组件库,数据源sdk,应用运行时
|
|
47
|
+
* IDependencies
|
|
48
|
+
*/
|
|
49
|
+
dependencies?: IDependencies;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
externalResources?: IExternalResource[];
|
|
54
|
+
/** 应用所在环境ID */
|
|
55
|
+
envId?: string;
|
|
56
|
+
/** 应用 id */
|
|
57
|
+
id?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 格式和npm一样
|
|
61
|
+
* 格式:{ '@命名空间/组件库名称': <protocal>:<path>?v=<版本号> } 遵循URL规范
|
|
62
|
+
* 命名空间有:
|
|
63
|
+
* (1) @tcwd。value对应是‘weda:’开头
|
|
64
|
+
* (2) @账户ID。value对应是‘weda:’开头
|
|
65
|
+
* (2) 无命名空间,则认为是npm。value是版本号
|
|
66
|
+
*
|
|
67
|
+
* path代表类型,目前有:
|
|
68
|
+
* (1) components,代表组件库
|
|
69
|
+
* (2) datasources,代表数据源
|
|
70
|
+
* (3) app,应用
|
|
71
|
+
*
|
|
72
|
+
* 例子
|
|
73
|
+
* {
|
|
74
|
+
* "@tcwd/gsd-h5-react": "weda:components?v=1.0.0", // 官方组件库
|
|
75
|
+
* "@304028332/weda_business_ui: : "weda:components?v=1.0.0", // 用户组件库
|
|
76
|
+
* "lodash: "2.1.2", // npm包
|
|
77
|
+
* }
|
|
78
|
+
*/
|
|
79
|
+
export declare type IDependencies = {
|
|
80
|
+
[key: string]: string;
|
|
81
|
+
};
|
|
82
|
+
export interface IPlatformAppExtra {
|
|
83
|
+
/**
|
|
84
|
+
* 应用统一路由模式
|
|
85
|
+
*/
|
|
86
|
+
historyType?: 'HASH' | 'BROWSER';
|
|
87
|
+
/**
|
|
88
|
+
* 额外 npm 依赖
|
|
89
|
+
*/
|
|
90
|
+
npmDependencies?: {
|
|
91
|
+
[key: string]: string;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* 预设色彩值
|
|
95
|
+
*/
|
|
96
|
+
presetColors?: string[];
|
|
97
|
+
/**
|
|
98
|
+
* 生成自增ID极限范围
|
|
99
|
+
*/
|
|
100
|
+
maxID?: number;
|
|
101
|
+
/**
|
|
102
|
+
* 小程序插件
|
|
103
|
+
*/
|
|
104
|
+
plugins?: {
|
|
105
|
+
title: string;
|
|
106
|
+
name: string;
|
|
107
|
+
module: string;
|
|
108
|
+
type?: 'kbone' | 'mp';
|
|
109
|
+
version: string;
|
|
110
|
+
}[];
|
|
111
|
+
/**
|
|
112
|
+
* 小程序子包名 或 web 子页面路径
|
|
113
|
+
*/
|
|
114
|
+
rootPath?: string | null;
|
|
115
|
+
/**
|
|
116
|
+
* 主题定义
|
|
117
|
+
*/
|
|
118
|
+
themeVars?: {
|
|
119
|
+
[key: string]: string;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* 应用额外定义
|
|
123
|
+
*/
|
|
124
|
+
appConfig?: {};
|
|
125
|
+
/**
|
|
126
|
+
* 小程序插件描述
|
|
127
|
+
*/
|
|
128
|
+
miniprogramPlugins?: {
|
|
129
|
+
name: string;
|
|
130
|
+
version: string;
|
|
131
|
+
pluginAppId: string;
|
|
132
|
+
componentConfigs: (object & {
|
|
133
|
+
isMiniProgramPlugins?: boolean;
|
|
134
|
+
})[];
|
|
135
|
+
}[];
|
|
136
|
+
/**
|
|
137
|
+
* 当前页面静态资源域名(html、图片等静态资源)
|
|
138
|
+
*/
|
|
139
|
+
domain?: string;
|
|
140
|
+
/**
|
|
141
|
+
* 隐藏插槽配置
|
|
142
|
+
*/
|
|
143
|
+
compHiddenConfig?: {
|
|
144
|
+
[pageId: string]: string[];
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* 基准历史ID
|
|
148
|
+
*/
|
|
149
|
+
originHistoryId?: string;
|
|
150
|
+
/**
|
|
151
|
+
* 组件库上个版本信息。格式为:
|
|
152
|
+
* { @tcwd/CLOUDBASE_BUSSINESS: "weda:components?v=1.22.3&updateTime=1662369434696", @tcwd/CLOUDBASE_STANDARD: "weda:components?v=1.4.2&updateTime=1662369434696"}
|
|
153
|
+
*/
|
|
154
|
+
lastDependencies?: {
|
|
155
|
+
[key: string]: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
export interface IPlatformAppLifeCycle extends IEvents {
|
|
159
|
+
/**
|
|
160
|
+
* 可选,onShow钩子函数名称
|
|
161
|
+
*/
|
|
162
|
+
lifecycleOnShowEventName?: string;
|
|
163
|
+
/**
|
|
164
|
+
* 可选,onHide钩子函数名称
|
|
165
|
+
*/
|
|
166
|
+
lifecycleOnHideEventName?: string;
|
|
167
|
+
/**
|
|
168
|
+
* 可选,onLaunch钩子函数名称
|
|
169
|
+
*/
|
|
170
|
+
lifecycleOnLaunchEventName?: string;
|
|
171
|
+
}
|
|
172
|
+
export interface IExternalResource {
|
|
173
|
+
type: EExternalResourceType;
|
|
174
|
+
url?: string;
|
|
175
|
+
code?: string;
|
|
176
|
+
}
|
|
177
177
|
//# sourceMappingURL=app.d.ts.map
|
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
import * as Basic from '../basic/common';
|
|
2
|
-
import { IDataSourceVariable } from './datasource';
|
|
3
|
-
/** 变量 */
|
|
4
|
-
export interface IPlatformDataset extends Basic.IDataset {
|
|
5
|
-
/** 状态 */
|
|
6
|
-
state?: Record<string, Basic.IStateVariable | IDataSourceVariable>;
|
|
7
|
-
/** 页面/应用 参数 */
|
|
8
|
-
params?: Record<string, Basic.IParamsVariable>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* 资源类型
|
|
12
|
-
*/
|
|
13
|
-
export declare const EResourceType: {
|
|
14
|
-
readonly CODE: "CODE";
|
|
15
|
-
readonly LIBRARY: "LIBRARY";
|
|
16
|
-
};
|
|
17
|
-
export declare enum ECodeType {
|
|
18
|
-
/**
|
|
19
|
-
* 生命周期
|
|
20
|
-
*/
|
|
21
|
-
LIFECYCLE = "lifecycle",
|
|
22
|
-
/**
|
|
23
|
-
* 配置
|
|
24
|
-
*/
|
|
25
|
-
CONFIG = "config",
|
|
26
|
-
/**
|
|
27
|
-
* 状态
|
|
28
|
-
*/
|
|
29
|
-
STATE = "state",
|
|
30
|
-
/**
|
|
31
|
-
* 计算状态
|
|
32
|
-
*/
|
|
33
|
-
COMPUTEDN = "computed",
|
|
34
|
-
/**
|
|
35
|
-
* 处理方法,用于处理页面级别的逻辑
|
|
36
|
-
* 拥有页面实例上下文,如可取得 state 状态 page/hanlder
|
|
37
|
-
*/
|
|
38
|
-
HANDLER_FN = "handler-fn",
|
|
39
|
-
/**
|
|
40
|
-
* 一般的模块
|
|
41
|
-
* 可以是任意JS模块,但不具有页面实例上下文。一般用于写通用方法等 global/common
|
|
42
|
-
*/
|
|
43
|
-
NORMAL_MODULE = "normal-module",
|
|
44
|
-
/**
|
|
45
|
-
* less 文件
|
|
46
|
-
*/
|
|
47
|
-
STYLE = "style",
|
|
48
|
-
/**
|
|
49
|
-
* theme less
|
|
50
|
-
*/
|
|
51
|
-
THEME = "theme",
|
|
52
|
-
/**
|
|
53
|
-
* 小程序全局配置
|
|
54
|
-
*/
|
|
55
|
-
MPCONFIG = "mp_config",
|
|
56
|
-
/**
|
|
57
|
-
* 渲染器类型 JSX
|
|
58
|
-
*/
|
|
59
|
-
RENDERER = "renderer"
|
|
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
|
-
}
|
|
92
|
-
export interface ICodeResource extends Basic.IResource {
|
|
93
|
-
/**
|
|
94
|
-
* 资源类型
|
|
95
|
-
*/
|
|
96
|
-
type: 'CODE';
|
|
97
|
-
/**
|
|
98
|
-
* 必填, 代码片段
|
|
99
|
-
*/
|
|
100
|
-
code: string;
|
|
101
|
-
/**
|
|
102
|
-
* 选填, 代码片段的简介
|
|
103
|
-
*/
|
|
104
|
-
description?: string;
|
|
105
|
-
/**
|
|
106
|
-
* 选填, 代码片段的路径, 可用于组建代码树
|
|
107
|
-
*/
|
|
108
|
-
path?: string;
|
|
109
|
-
/**
|
|
110
|
-
* 选填, 代码类型
|
|
111
|
-
*/
|
|
112
|
-
codeType?: string;
|
|
113
|
-
}
|
|
114
|
-
export interface ILibraryResource extends Basic.IResource {
|
|
115
|
-
type: 'LIBRARY';
|
|
116
|
-
/**
|
|
117
|
-
* 选填, 组件库的版本号
|
|
118
|
-
*/
|
|
119
|
-
version?: string;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* 组件绑定的监听器
|
|
123
|
-
*/
|
|
124
|
-
export interface IPlatformListener extends Basic.IListener {
|
|
125
|
-
/**
|
|
126
|
-
* 可选,监听器唯一标识
|
|
127
|
-
*/
|
|
128
|
-
id: string;
|
|
129
|
-
/**
|
|
130
|
-
*
|
|
131
|
-
*/
|
|
132
|
-
extra?: {
|
|
133
|
-
handlerParamExtraData?: {
|
|
134
|
-
[key: string]: any;
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
}
|
|
1
|
+
import * as Basic from '../basic/common';
|
|
2
|
+
import { IDataSourceVariable } from './datasource';
|
|
3
|
+
/** 变量 */
|
|
4
|
+
export interface IPlatformDataset extends Basic.IDataset {
|
|
5
|
+
/** 状态 */
|
|
6
|
+
state?: Record<string, Basic.IStateVariable | IDataSourceVariable>;
|
|
7
|
+
/** 页面/应用 参数 */
|
|
8
|
+
params?: Record<string, Basic.IParamsVariable>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 资源类型
|
|
12
|
+
*/
|
|
13
|
+
export declare const EResourceType: {
|
|
14
|
+
readonly CODE: "CODE";
|
|
15
|
+
readonly LIBRARY: "LIBRARY";
|
|
16
|
+
};
|
|
17
|
+
export declare enum ECodeType {
|
|
18
|
+
/**
|
|
19
|
+
* 生命周期
|
|
20
|
+
*/
|
|
21
|
+
LIFECYCLE = "lifecycle",
|
|
22
|
+
/**
|
|
23
|
+
* 配置
|
|
24
|
+
*/
|
|
25
|
+
CONFIG = "config",
|
|
26
|
+
/**
|
|
27
|
+
* 状态
|
|
28
|
+
*/
|
|
29
|
+
STATE = "state",
|
|
30
|
+
/**
|
|
31
|
+
* 计算状态
|
|
32
|
+
*/
|
|
33
|
+
COMPUTEDN = "computed",
|
|
34
|
+
/**
|
|
35
|
+
* 处理方法,用于处理页面级别的逻辑
|
|
36
|
+
* 拥有页面实例上下文,如可取得 state 状态 page/hanlder
|
|
37
|
+
*/
|
|
38
|
+
HANDLER_FN = "handler-fn",
|
|
39
|
+
/**
|
|
40
|
+
* 一般的模块
|
|
41
|
+
* 可以是任意JS模块,但不具有页面实例上下文。一般用于写通用方法等 global/common
|
|
42
|
+
*/
|
|
43
|
+
NORMAL_MODULE = "normal-module",
|
|
44
|
+
/**
|
|
45
|
+
* less 文件
|
|
46
|
+
*/
|
|
47
|
+
STYLE = "style",
|
|
48
|
+
/**
|
|
49
|
+
* theme less
|
|
50
|
+
*/
|
|
51
|
+
THEME = "theme",
|
|
52
|
+
/**
|
|
53
|
+
* 小程序全局配置
|
|
54
|
+
*/
|
|
55
|
+
MPCONFIG = "mp_config",
|
|
56
|
+
/**
|
|
57
|
+
* 渲染器类型 JSX
|
|
58
|
+
*/
|
|
59
|
+
RENDERER = "renderer"
|
|
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
|
+
}
|
|
92
|
+
export interface ICodeResource extends Basic.IResource {
|
|
93
|
+
/**
|
|
94
|
+
* 资源类型
|
|
95
|
+
*/
|
|
96
|
+
type: 'CODE';
|
|
97
|
+
/**
|
|
98
|
+
* 必填, 代码片段
|
|
99
|
+
*/
|
|
100
|
+
code: string;
|
|
101
|
+
/**
|
|
102
|
+
* 选填, 代码片段的简介
|
|
103
|
+
*/
|
|
104
|
+
description?: string;
|
|
105
|
+
/**
|
|
106
|
+
* 选填, 代码片段的路径, 可用于组建代码树
|
|
107
|
+
*/
|
|
108
|
+
path?: string;
|
|
109
|
+
/**
|
|
110
|
+
* 选填, 代码类型
|
|
111
|
+
*/
|
|
112
|
+
codeType?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface ILibraryResource extends Basic.IResource {
|
|
115
|
+
type: 'LIBRARY';
|
|
116
|
+
/**
|
|
117
|
+
* 选填, 组件库的版本号
|
|
118
|
+
*/
|
|
119
|
+
version?: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* 组件绑定的监听器
|
|
123
|
+
*/
|
|
124
|
+
export interface IPlatformListener extends Basic.IListener {
|
|
125
|
+
/**
|
|
126
|
+
* 可选,监听器唯一标识
|
|
127
|
+
*/
|
|
128
|
+
id: string;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
extra?: {
|
|
133
|
+
handlerParamExtraData?: {
|
|
134
|
+
[key: string]: any;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
138
|
//# sourceMappingURL=common.d.ts.map
|