@cloudbase/framework-plugin-low-code 1.0.2-beta.3 → 1.0.3-beta.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/builder/config/common.d.ts +2 -0
- package/lib/builder/config/common.d.ts.map +1 -0
- package/lib/builder/config/common.js +13 -0
- package/lib/builder/config/index.d.ts +3 -0
- package/lib/builder/config/index.d.ts.map +1 -0
- package/lib/builder/config/index.js +29 -0
- package/lib/builder/config/mp.d.ts +2 -0
- package/lib/builder/config/mp.d.ts.map +1 -0
- package/lib/builder/config/mp.js +13 -0
- package/lib/builder/core/copy.d.ts +5 -0
- package/lib/builder/core/copy.d.ts.map +1 -0
- package/lib/builder/core/copy.js +62 -0
- package/lib/builder/core/generate.d.ts +9 -0
- package/lib/builder/core/generate.d.ts.map +1 -0
- package/lib/builder/core/generate.js +128 -0
- package/lib/builder/core/index.d.ts +32 -0
- package/lib/builder/core/index.d.ts.map +1 -0
- package/lib/builder/core/index.js +149 -0
- package/lib/builder/core/material.d.ts +4 -0
- package/lib/builder/core/material.d.ts.map +1 -0
- package/lib/builder/core/material.js +80 -0
- package/lib/builder/core/plugin.d.ts +4 -0
- package/lib/builder/core/plugin.d.ts.map +1 -0
- package/lib/builder/core/plugin.js +30 -0
- package/lib/builder/core/prepare.d.ts +8 -0
- package/lib/builder/core/prepare.d.ts.map +1 -0
- package/lib/builder/core/prepare.js +108 -0
- package/lib/builder/core/webpack.d.ts +15 -0
- package/lib/builder/core/webpack.d.ts.map +1 -0
- package/lib/builder/core/webpack.js +58 -0
- package/lib/builder/mp/BuildContext.d.ts +13 -0
- package/lib/builder/mp/BuildContext.d.ts.map +1 -0
- package/lib/builder/mp/BuildContext.js +2 -0
- package/lib/builder/mp/index.d.ts +33 -0
- package/lib/builder/mp/index.d.ts.map +1 -0
- package/lib/builder/mp/index.js +450 -0
- package/lib/builder/mp/lowcode.d.ts +8 -0
- package/lib/builder/mp/lowcode.d.ts.map +1 -0
- package/lib/builder/mp/lowcode.js +58 -0
- package/lib/builder/mp/materials.d.ts +15 -0
- package/lib/builder/mp/materials.d.ts.map +1 -0
- package/lib/builder/mp/materials.js +338 -0
- package/lib/builder/mp/mixMode.d.ts +10 -0
- package/lib/builder/mp/mixMode.d.ts.map +1 -0
- package/lib/builder/mp/mixMode.js +215 -0
- package/lib/builder/mp/mp_config.d.ts +18 -0
- package/lib/builder/mp/mp_config.d.ts.map +1 -0
- package/lib/builder/mp/mp_config.js +206 -0
- package/lib/builder/mp/util.d.ts +20 -0
- package/lib/builder/mp/util.d.ts.map +1 -0
- package/lib/builder/mp/util.js +243 -0
- package/lib/builder/mp/wxml.d.ts +16 -0
- package/lib/builder/mp/wxml.d.ts.map +1 -0
- package/lib/builder/mp/wxml.js +300 -0
- package/lib/builder/service/builder/copy.d.ts +14 -0
- package/lib/builder/service/builder/copy.d.ts.map +1 -0
- package/lib/builder/service/builder/copy.js +189 -0
- package/lib/builder/service/builder/generate.d.ts +52 -0
- package/lib/builder/service/builder/generate.d.ts.map +1 -0
- package/lib/builder/service/builder/generate.js +789 -0
- package/lib/builder/service/builder/index.d.ts +16 -0
- package/lib/builder/service/builder/index.d.ts.map +1 -0
- package/lib/builder/service/builder/index.js +69 -0
- package/lib/builder/service/builder/plugin.d.ts +8 -0
- package/lib/builder/service/builder/plugin.d.ts.map +1 -0
- package/lib/builder/service/builder/plugin.js +149 -0
- package/lib/builder/service/builder/webpack.d.ts +91 -0
- package/lib/builder/service/builder/webpack.d.ts.map +1 -0
- package/lib/builder/service/builder/webpack.js +589 -0
- package/lib/builder/types/common.d.ts +12 -0
- package/lib/builder/types/common.d.ts.map +1 -0
- package/lib/builder/types/common.js +7 -0
- package/lib/builder/util/common.d.ts +36 -0
- package/lib/builder/util/common.d.ts.map +1 -0
- package/lib/builder/util/common.js +257 -0
- package/lib/builder/util/console.d.ts +2 -0
- package/lib/builder/util/console.d.ts.map +1 -0
- package/lib/builder/util/console.js +13 -0
- package/lib/builder/util/generateFiles.d.ts +6 -0
- package/lib/builder/util/generateFiles.d.ts.map +1 -0
- package/lib/builder/util/generateFiles.js +94 -0
- package/lib/builder/util/index.d.ts +2 -0
- package/lib/builder/util/index.d.ts.map +1 -0
- package/lib/builder/util/index.js +13 -0
- package/lib/builder/util/junk.d.ts +3 -0
- package/lib/builder/util/junk.d.ts.map +1 -0
- package/lib/builder/util/junk.js +25 -0
- package/lib/builder/util/mp.d.ts +5 -0
- package/lib/builder/util/mp.d.ts.map +1 -0
- package/lib/builder/util/mp.js +99 -0
- package/lib/builder/util/name-mangler.d.ts +3 -0
- package/lib/builder/util/name-mangler.d.ts.map +1 -0
- package/lib/builder/util/name-mangler.js +7 -0
- package/lib/builder/util/net.d.ts +3 -0
- package/lib/builder/util/net.d.ts.map +1 -0
- package/lib/builder/util/net.js +54 -0
- package/lib/builder/util/process.d.ts +9 -0
- package/lib/builder/util/process.d.ts.map +1 -0
- package/lib/builder/util/process.js +28 -0
- package/lib/builder/util/style.d.ts +2 -0
- package/lib/builder/util/style.d.ts.map +1 -0
- package/lib/builder/util/style.js +13 -0
- package/lib/builder/util/weapp.d.ts +2 -0
- package/lib/builder/util/weapp.d.ts.map +1 -0
- package/lib/builder/util/weapp.js +13 -0
- package/lib/generator/config/common.d.ts +6 -0
- package/lib/generator/config/common.d.ts.map +1 -0
- package/lib/generator/config/common.js +25 -0
- package/lib/generator/config/index.d.ts +18 -0
- package/lib/generator/config/index.d.ts.map +1 -0
- package/lib/generator/config/index.js +43 -0
- package/lib/generator/config/mp.d.ts +56 -0
- package/lib/generator/config/mp.d.ts.map +1 -0
- package/lib/generator/config/mp.js +104 -0
- package/lib/generator/core/generate.d.ts +59 -0
- package/lib/generator/core/generate.d.ts.map +1 -0
- package/lib/generator/core/generate.js +669 -0
- package/lib/generator/core/index.d.ts +25 -0
- package/lib/generator/core/index.d.ts.map +1 -0
- package/lib/generator/core/index.js +102 -0
- package/lib/generator/core/material.d.ts +14 -0
- package/lib/generator/core/material.d.ts.map +1 -0
- package/lib/generator/core/material.js +230 -0
- package/lib/generator/template.d.ts +3 -0
- package/lib/generator/template.d.ts.map +1 -0
- package/lib/generator/template.js +3 -0
- package/lib/generator/types/common.d.ts +69 -0
- package/lib/generator/types/common.d.ts.map +1 -0
- package/lib/generator/types/common.js +21 -0
- package/lib/generator/util/common.d.ts +36 -0
- package/lib/generator/util/common.d.ts.map +1 -0
- package/lib/generator/util/common.js +238 -0
- package/lib/generator/util/console.d.ts +3 -0
- package/lib/generator/util/console.d.ts.map +1 -0
- package/lib/generator/util/console.js +17 -0
- package/lib/generator/util/index.d.ts +2 -0
- package/lib/generator/util/index.d.ts.map +1 -0
- package/lib/generator/util/index.js +13 -0
- package/lib/generator/util/name-mangler.d.ts +17 -0
- package/lib/generator/util/name-mangler.d.ts.map +1 -0
- package/lib/generator/util/name-mangler.js +63 -0
- package/lib/generator/util/postcss-rpx.d.ts +11 -0
- package/lib/generator/util/postcss-rpx.d.ts.map +1 -0
- package/lib/generator/util/postcss-rpx.js +16 -0
- package/lib/generator/util/style.d.ts +6 -0
- package/lib/generator/util/style.d.ts.map +1 -0
- package/lib/generator/util/style.js +92 -0
- package/lib/generator/util/weapp.d.ts +5 -0
- package/lib/generator/util/weapp.d.ts.map +1 -0
- package/lib/generator/util/weapp.js +17 -0
- package/lib/types.d.ts +14 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +19 -0
- package/lib/weapps-core/config/index.d.ts +2 -0
- package/lib/weapps-core/config/index.d.ts.map +1 -0
- package/lib/weapps-core/config/index.js +13 -0
- package/lib/weapps-core/config/style.d.ts +7 -0
- package/lib/weapps-core/config/style.d.ts.map +1 -0
- package/lib/weapps-core/config/style.js +70 -0
- package/lib/weapps-core/index.d.ts +6 -0
- package/lib/weapps-core/index.d.ts.map +1 -0
- package/lib/weapps-core/index.js +31 -0
- package/lib/weapps-core/types/action.d.ts +25 -0
- package/lib/weapps-core/types/action.d.ts.map +1 -0
- package/lib/weapps-core/types/action.js +28 -0
- package/lib/weapps-core/types/app.d.ts +142 -0
- package/lib/weapps-core/types/app.d.ts.map +1 -0
- package/lib/weapps-core/types/app.js +21 -0
- package/lib/weapps-core/types/appbuild.d.ts +63 -0
- package/lib/weapps-core/types/appbuild.d.ts.map +1 -0
- package/lib/weapps-core/types/appbuild.js +78 -0
- package/lib/weapps-core/types/code_types.d.ts +26 -0
- package/lib/weapps-core/types/code_types.d.ts.map +1 -0
- package/lib/weapps-core/types/code_types.js +2 -0
- package/lib/weapps-core/types/git.d.ts +7 -0
- package/lib/weapps-core/types/git.d.ts.map +1 -0
- package/lib/weapps-core/types/git.js +2 -0
- package/lib/weapps-core/types/index.d.ts +11 -0
- package/lib/weapps-core/types/index.d.ts.map +1 -0
- package/lib/weapps-core/types/index.js +22 -0
- package/lib/weapps-core/types/lowcode.d.ts +26 -0
- package/lib/weapps-core/types/lowcode.d.ts.map +1 -0
- package/lib/weapps-core/types/lowcode.js +25 -0
- package/lib/weapps-core/types/material.d.ts +90 -0
- package/lib/weapps-core/types/material.d.ts.map +1 -0
- package/lib/weapps-core/types/material.js +9 -0
- package/lib/weapps-core/types/plugins.d.ts +17 -0
- package/lib/weapps-core/types/plugins.d.ts.map +1 -0
- package/lib/weapps-core/types/plugins.js +2 -0
- package/lib/weapps-core/types/style.d.ts +93 -0
- package/lib/weapps-core/types/style.d.ts.map +1 -0
- package/lib/weapps-core/types/style.js +2 -0
- package/lib/weapps-core/types/web.d.ts +120 -0
- package/lib/weapps-core/types/web.d.ts.map +1 -0
- package/lib/weapps-core/types/web.js +2 -0
- package/lib/weapps-core/utils/appbuild.d.ts +6 -0
- package/lib/weapps-core/utils/appbuild.d.ts.map +1 -0
- package/lib/weapps-core/utils/appbuild.js +40 -0
- package/lib/weapps-core/utils/common.d.ts +16 -0
- package/lib/weapps-core/utils/common.d.ts.map +1 -0
- package/lib/weapps-core/utils/common.js +90 -0
- package/lib/weapps-core/utils/file.d.ts +12 -0
- package/lib/weapps-core/utils/file.d.ts.map +1 -0
- package/lib/weapps-core/utils/file.js +142 -0
- package/lib/weapps-core/utils/formily.d.ts +5 -0
- package/lib/weapps-core/utils/formily.d.ts.map +1 -0
- package/lib/weapps-core/utils/formily.js +416 -0
- package/lib/weapps-core/utils/index.d.ts +7 -0
- package/lib/weapps-core/utils/index.d.ts.map +1 -0
- package/lib/weapps-core/utils/index.js +18 -0
- package/lib/weapps-core/utils/lowcdoe.d.ts +4 -0
- package/lib/weapps-core/utils/lowcdoe.d.ts.map +1 -0
- package/lib/weapps-core/utils/lowcdoe.js +69 -0
- package/lib/weapps-core/utils/style.d.ts +17 -0
- package/lib/weapps-core/utils/style.d.ts.map +1 -0
- package/lib/weapps-core/utils/style.js +330 -0
- package/package.json +5 -5
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { IWeAppComponentInstance } from './app';
|
|
2
|
+
import { IWeAppCode } from './lowcode';
|
|
3
|
+
export interface ICompLibCommonResource {
|
|
4
|
+
theme: {
|
|
5
|
+
variable: string;
|
|
6
|
+
class: string;
|
|
7
|
+
};
|
|
8
|
+
class: string;
|
|
9
|
+
const: IWeAppCode;
|
|
10
|
+
tools: IWeAppCode;
|
|
11
|
+
npm: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface IMaterialItem {
|
|
16
|
+
compLibCommonResource: ICompLibCommonResource;
|
|
17
|
+
name: string;
|
|
18
|
+
version: string;
|
|
19
|
+
srcZipUrl: string;
|
|
20
|
+
mpPkgUrl: string;
|
|
21
|
+
actions: {
|
|
22
|
+
name: string;
|
|
23
|
+
}[];
|
|
24
|
+
components: ICompositedComponent[];
|
|
25
|
+
isComposite?: boolean;
|
|
26
|
+
isMiniProgramPlugins?: boolean;
|
|
27
|
+
styles?: string[];
|
|
28
|
+
dependencies?: {};
|
|
29
|
+
schemaVersion?: string;
|
|
30
|
+
meta?: Record<string, any>;
|
|
31
|
+
componentInstances?: IWeAppComponentInstance[];
|
|
32
|
+
}
|
|
33
|
+
export interface IComponentLibEntry {
|
|
34
|
+
entry: string;
|
|
35
|
+
components?: string;
|
|
36
|
+
actions?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ICompositedComponent {
|
|
39
|
+
id: number;
|
|
40
|
+
name: string;
|
|
41
|
+
materialName: string;
|
|
42
|
+
componentInstances: {
|
|
43
|
+
[key: string]: IWeAppComponentInstance;
|
|
44
|
+
};
|
|
45
|
+
compConfig: Record<string, any>;
|
|
46
|
+
dataForm: any;
|
|
47
|
+
evnets?: any[];
|
|
48
|
+
emitEvents: any[];
|
|
49
|
+
listeners: any[];
|
|
50
|
+
lowCodes: IWeAppCode[];
|
|
51
|
+
meta: IComponentMeta;
|
|
52
|
+
npmDependencies: any;
|
|
53
|
+
}
|
|
54
|
+
export interface IDependencies {
|
|
55
|
+
[key: string]: string;
|
|
56
|
+
}
|
|
57
|
+
export interface IComponentMeta {
|
|
58
|
+
title: string;
|
|
59
|
+
desc?: string;
|
|
60
|
+
category?: string;
|
|
61
|
+
categoryOrder?: number;
|
|
62
|
+
componentOrder?: number;
|
|
63
|
+
inputProps: {
|
|
64
|
+
[valuePropName: string]: IPropSynConfig;
|
|
65
|
+
};
|
|
66
|
+
syncProps: {
|
|
67
|
+
[valuePropName: string]: IPropSynConfig | IPropSynConfig[];
|
|
68
|
+
};
|
|
69
|
+
platforms: {
|
|
70
|
+
mp: {
|
|
71
|
+
tagName?: string;
|
|
72
|
+
path?: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
mustEmptyStyle?: boolean;
|
|
76
|
+
}
|
|
77
|
+
interface IPropSynConfig {
|
|
78
|
+
changeEvent: string;
|
|
79
|
+
valueFromEvent: string;
|
|
80
|
+
isFormField?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface IGenericComp {
|
|
83
|
+
propName: string;
|
|
84
|
+
title: string;
|
|
85
|
+
}
|
|
86
|
+
export declare const COMPONENT_API_PREFIX = "this.$WEAPPS_COMP";
|
|
87
|
+
export declare const PAGE_API_PREFIX = "this";
|
|
88
|
+
export declare function getCompositedComponentClass(comp: ICompositedComponent): string;
|
|
89
|
+
export {};
|
|
90
|
+
//# sourceMappingURL=material.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/weapps-core/types/material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,GAAG,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAChC;AAGD,MAAM,WAAW,aAAa;IAC5B,qBAAqB,EAAE,sBAAsB,CAAC;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5B,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IAItB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAG/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,EAAE,CAAC;IAGlB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAG3B,kBAAkB,CAAC,EAAE,uBAAuB,EAAE,CAAC;CAChD;AAED,MAAM,WA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AC;CAC1B;AAED,UAAU,cAAc;IAEtB,WAAW,EAAE,MAAM,CAAC;IAEpB,cAAc,EAAE,MAAM,CAAC;IAEvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AACxD,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,oBAAoB,UAErE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCompositedComponentClass = exports.PAGE_API_PREFIX = exports.COMPONENT_API_PREFIX = void 0;
|
|
4
|
+
exports.COMPONENT_API_PREFIX = 'this.$WEAPPS_COMP';
|
|
5
|
+
exports.PAGE_API_PREFIX = 'this';
|
|
6
|
+
function getCompositedComponentClass(comp) {
|
|
7
|
+
return `wa-comp-${comp.materialName}-${comp.name}`;
|
|
8
|
+
}
|
|
9
|
+
exports.getCompositedComponentClass = getCompositedComponentClass;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ICompositedComponent } from './material';
|
|
2
|
+
export interface IPlugin {
|
|
3
|
+
title: string;
|
|
4
|
+
name: string;
|
|
5
|
+
module: string;
|
|
6
|
+
type?: 'kbone' | 'mp';
|
|
7
|
+
version: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IMiniprogramPlugin {
|
|
10
|
+
name: string;
|
|
11
|
+
version: string;
|
|
12
|
+
pluginAppId: string;
|
|
13
|
+
componentConfigs: (ICompositedComponent & {
|
|
14
|
+
isMiniProgramPlugins?: boolean;
|
|
15
|
+
})[];
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../src/weapps-core/types/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,CAAC,oBAAoB,GAAG;QACxC,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,CAAC,EAAE,CAAC;CACN"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export declare type PX = string;
|
|
2
|
+
export declare type Percent = number;
|
|
3
|
+
export declare type Color = string;
|
|
4
|
+
export declare type URL = string;
|
|
5
|
+
export declare type CSSProperties = any;
|
|
6
|
+
export interface ICommonStyle {
|
|
7
|
+
size?: ISizeStyle;
|
|
8
|
+
transform?: ITransformStyle;
|
|
9
|
+
text?: ITextStyle;
|
|
10
|
+
margin?: IDistanceStyleWithAuto;
|
|
11
|
+
padding?: IDistanceStyle;
|
|
12
|
+
border?: IBorderStyle;
|
|
13
|
+
background?: IBackgroundStyle;
|
|
14
|
+
position?: IPositionStyle;
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
custom?: ICustomStyle[];
|
|
17
|
+
self?: object;
|
|
18
|
+
display?: string;
|
|
19
|
+
flexConfig?: {
|
|
20
|
+
flexDirection?: string;
|
|
21
|
+
justifyContent?: string;
|
|
22
|
+
alignItems?: string;
|
|
23
|
+
flexWrap?: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface IPositionStyle {
|
|
27
|
+
position?: 'fixed' | 'absolute' | 'relative' | 'static';
|
|
28
|
+
top?: PX;
|
|
29
|
+
right?: PX | 'auto';
|
|
30
|
+
bottom?: PX;
|
|
31
|
+
left?: PX | 'auto';
|
|
32
|
+
}
|
|
33
|
+
export interface ISizeStyle {
|
|
34
|
+
autoWidth: boolean;
|
|
35
|
+
width: PX;
|
|
36
|
+
autoHeight: boolean;
|
|
37
|
+
height: PX;
|
|
38
|
+
}
|
|
39
|
+
export interface ITransformStyle {
|
|
40
|
+
rotate: number;
|
|
41
|
+
opacity: number;
|
|
42
|
+
scale: number;
|
|
43
|
+
radius: PX;
|
|
44
|
+
}
|
|
45
|
+
export interface ITextStyle {
|
|
46
|
+
color: Color;
|
|
47
|
+
fontSize: PX;
|
|
48
|
+
lineHeight: PX;
|
|
49
|
+
textAlign: 'left' | 'center' | 'right' | 'justify';
|
|
50
|
+
weight: 'lighter' | 'bolder' | 'normal';
|
|
51
|
+
opacity: number;
|
|
52
|
+
}
|
|
53
|
+
export interface IBorderStyle {
|
|
54
|
+
type: 'none' | 'solid' | 'dashed';
|
|
55
|
+
color: Color;
|
|
56
|
+
width: PX;
|
|
57
|
+
radius?: PX;
|
|
58
|
+
radiusInfo?: {
|
|
59
|
+
topLeft: string;
|
|
60
|
+
topRight: string;
|
|
61
|
+
bottomRight: string;
|
|
62
|
+
bottomLeft: string;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface IBackgroundStyle {
|
|
66
|
+
bgType: 'color' | 'image';
|
|
67
|
+
color: Color;
|
|
68
|
+
image: URL;
|
|
69
|
+
size: string;
|
|
70
|
+
repeat: string;
|
|
71
|
+
position?: string;
|
|
72
|
+
positionObj?: {
|
|
73
|
+
left: string;
|
|
74
|
+
top: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export interface IDistanceStyle {
|
|
78
|
+
top?: PX;
|
|
79
|
+
right?: PX;
|
|
80
|
+
bottom?: PX;
|
|
81
|
+
left?: PX;
|
|
82
|
+
}
|
|
83
|
+
export interface IDistanceStyleWithAuto {
|
|
84
|
+
top?: PX;
|
|
85
|
+
right?: PX | 'auto';
|
|
86
|
+
bottom?: PX;
|
|
87
|
+
left?: PX | 'auto';
|
|
88
|
+
}
|
|
89
|
+
export interface ICustomStyle {
|
|
90
|
+
key: string;
|
|
91
|
+
value: string;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/weapps-core/types/style.ts"],"names":[],"mappings":"AAAA,oBAAY,EAAE,GAAG,MAAM,CAAC;AACxB,oBAAY,OAAO,GAAG,MAAM,CAAC;AAC7B,oBAAY,KAAK,GAAG,MAAM,CAAC;AAC3B,oBAAY,GAAG,GAAG,MAAM,CAAC;AAMzB,oBAAY,aAAa,GAAG,GAAG,CAAC;AAEhC,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE;QACX,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,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AC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,EAAE,EAAE,CAAC;IACX,MAAM,CAAC,EAAE,EAAE,CAAC;IACZ,IAAI,CAAC,EAAE,EAAE,CAAC;CACX;AAED,MAAM,WAAW,sBAAsB;IACrC,GAAG,CAAC,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,EAAE,CAAC;IACZ,IAAI,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { ActionType } from './action';
|
|
2
|
+
import { ICommonStyle } from './style';
|
|
3
|
+
import { IWeAppCode } from './lowcode';
|
|
4
|
+
import { IPlugin } from './plugins';
|
|
5
|
+
import { PropBindType, IEventModifiers, IAppAndPageVar, IWeAppComponentInstance } from './app';
|
|
6
|
+
export interface IWebRuntimeAppData extends IAppAndPageVar {
|
|
7
|
+
envId?: string;
|
|
8
|
+
datasources: any[];
|
|
9
|
+
selectedPageId?: string;
|
|
10
|
+
pageInstanceList: IPageInstance[];
|
|
11
|
+
rootPath?: string;
|
|
12
|
+
maxID?: number;
|
|
13
|
+
codeModules: IWeAppCode[];
|
|
14
|
+
npmDependencies: {
|
|
15
|
+
[packageName: string]: string;
|
|
16
|
+
};
|
|
17
|
+
plugins?: IPlugin[];
|
|
18
|
+
themeVars?: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
presetColors?: string[];
|
|
22
|
+
appConfig?: {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
extra: {
|
|
26
|
+
domain: string;
|
|
27
|
+
clientId?: string;
|
|
28
|
+
loginConfigVersion?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface IPageInstance extends ICommonInstanceProps, IAppAndPageVar {
|
|
32
|
+
id: string;
|
|
33
|
+
isHome?: boolean;
|
|
34
|
+
componentSchemaJson?: IComponentSchemaJson;
|
|
35
|
+
pluginInstances: IPluginInstance[];
|
|
36
|
+
children?: IPageInstance[];
|
|
37
|
+
codeModules: IWeAppCode[];
|
|
38
|
+
}
|
|
39
|
+
export interface IPageData {
|
|
40
|
+
title: string;
|
|
41
|
+
desc?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface IDataBind {
|
|
44
|
+
propertyPath: string;
|
|
45
|
+
bindDataPath: string;
|
|
46
|
+
type?: PropBindType;
|
|
47
|
+
}
|
|
48
|
+
export interface IDataType {
|
|
49
|
+
propertyPath: string;
|
|
50
|
+
type?: 'static' | 'slot' | 'bind';
|
|
51
|
+
}
|
|
52
|
+
export interface IDataAndBindInstanceProps {
|
|
53
|
+
data: {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
};
|
|
56
|
+
dataBinds?: IDataBind[];
|
|
57
|
+
dataTypes?: IDataType[];
|
|
58
|
+
}
|
|
59
|
+
export interface IItemInstance extends IDataAndBindInstanceProps {
|
|
60
|
+
key: Readonly<string>;
|
|
61
|
+
sourceKey: string;
|
|
62
|
+
instanceFunction?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface IPluginInstance extends IItemInstance {
|
|
65
|
+
instanceFunction?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface IListenerInstance extends IItemInstance, IEventModifiers {
|
|
68
|
+
trigger: string;
|
|
69
|
+
target?: string | null;
|
|
70
|
+
type: ActionType;
|
|
71
|
+
handler?: {
|
|
72
|
+
moduleName: string;
|
|
73
|
+
name: string;
|
|
74
|
+
};
|
|
75
|
+
jsCode?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface IComponentSchemaJson {
|
|
78
|
+
key?: string;
|
|
79
|
+
type?: string;
|
|
80
|
+
['x-component']?: string;
|
|
81
|
+
['x-props']?: IComponentInstanceProps;
|
|
82
|
+
['x-index']?: number;
|
|
83
|
+
properties: {
|
|
84
|
+
[key: string]: IComponentSchemaJson;
|
|
85
|
+
};
|
|
86
|
+
path?: string;
|
|
87
|
+
genericComp?: IWeAppComponentInstance['genericComp'];
|
|
88
|
+
}
|
|
89
|
+
export interface ICommonInstanceProps extends IDataAndBindInstanceProps {
|
|
90
|
+
style: object;
|
|
91
|
+
commonStyle?: ICommonStyle;
|
|
92
|
+
styleBindPath?: string;
|
|
93
|
+
styleBind?: IDataBind;
|
|
94
|
+
classNameListBind?: IDataBind;
|
|
95
|
+
classNameList?: string[];
|
|
96
|
+
listenerInstances: IListenerInstance[];
|
|
97
|
+
customDataForm?: Record<string, any>;
|
|
98
|
+
staticResourceAttribute?: string[];
|
|
99
|
+
}
|
|
100
|
+
export interface IComponentInstanceProps extends ICommonInstanceProps {
|
|
101
|
+
sourceKey: string;
|
|
102
|
+
isContainer: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface IPageWidgets {
|
|
105
|
+
style: Record<string, any>;
|
|
106
|
+
classList: string[];
|
|
107
|
+
value?: any;
|
|
108
|
+
[key: string]: any;
|
|
109
|
+
}
|
|
110
|
+
export interface II18nConfig {
|
|
111
|
+
enabled: boolean;
|
|
112
|
+
i18nData: any;
|
|
113
|
+
baseUrl?: string;
|
|
114
|
+
docUrl?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface IExtraData {
|
|
117
|
+
isComposite: boolean;
|
|
118
|
+
compProps: any;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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AAQ,EAAE,GAAG,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC;CAChB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CodingPublishType, IOutputs } from '../types/appbuild';
|
|
2
|
+
export declare const INIT_VERSION = "0.0.0";
|
|
3
|
+
export declare const checkVersion: (value: string) => boolean;
|
|
4
|
+
export declare const biggerThanVersion: (value?: string, lastVersion?: string) => boolean;
|
|
5
|
+
export declare const getPublishAppId: (codingPublishType: CodingPublishType, outputs: IOutputs) => string | undefined;
|
|
6
|
+
//# sourceMappingURL=appbuild.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appbuild.d.ts","sourceRoot":"","sources":["../../../src/weapps-core/utils/appbuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGhE,eAAO,MAAM,YAAY,UAAU,CAAC;AAGpC,eAAO,MAAM,YAAY,UAAW,MAAM,YAEzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,mDAqB7B,CAAC;AAEF,eAAO,MAAM,eAAe,sBACP,iBAAiB,WAC3B,QAAQ,uBAOlB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPublishAppId = exports.biggerThanVersion = exports.checkVersion = exports.INIT_VERSION = void 0;
|
|
4
|
+
const appbuild_1 = require("../types/appbuild");
|
|
5
|
+
exports.INIT_VERSION = '0.0.0';
|
|
6
|
+
const checkVersion = (value) => {
|
|
7
|
+
return /^\d+\.\d+(\.\d+){0,2}$/.test(value);
|
|
8
|
+
};
|
|
9
|
+
exports.checkVersion = checkVersion;
|
|
10
|
+
const biggerThanVersion = (value = '', lastVersion = '') => {
|
|
11
|
+
const nowVersions = value
|
|
12
|
+
.split('.')
|
|
13
|
+
.map((item) => (Number.isNaN(parseInt(item)) ? 0 : parseInt(item)));
|
|
14
|
+
const lastVersions = lastVersion
|
|
15
|
+
.split('.')
|
|
16
|
+
.map((item) => (Number.isNaN(parseInt(item)) ? 0 : parseInt(item)));
|
|
17
|
+
const maxLen = nowVersions.length > lastVersion.length
|
|
18
|
+
? nowVersions.length
|
|
19
|
+
: lastVersion.length;
|
|
20
|
+
for (let i = 0; i < maxLen; i++) {
|
|
21
|
+
const now = nowVersions[i] || 0;
|
|
22
|
+
const last = lastVersions[i] || 0;
|
|
23
|
+
if (now > last) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
else if (now < last) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
exports.biggerThanVersion = biggerThanVersion;
|
|
33
|
+
const getPublishAppId = (codingPublishType, outputs) => {
|
|
34
|
+
return codingPublishType === appbuild_1.CodingPublishType.Android
|
|
35
|
+
? outputs.appid
|
|
36
|
+
: codingPublishType === appbuild_1.CodingPublishType.iOS
|
|
37
|
+
? outputs.iOSappId
|
|
38
|
+
: 'main';
|
|
39
|
+
};
|
|
40
|
+
exports.getPublishAppId = getPublishAppId;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IDataBind } from '../types';
|
|
2
|
+
export declare function loopDealWithFn<Node extends {
|
|
3
|
+
children?: Node[];
|
|
4
|
+
}, R>(data: Node[], runFn: (a: Node) => R, result?: R[]): R[];
|
|
5
|
+
export declare function kebabCase(str: string): string;
|
|
6
|
+
export declare function camelcase(str: string, firstUpperCase?: boolean): string;
|
|
7
|
+
export declare function isArray(src: any): boolean;
|
|
8
|
+
export declare function isPlainObject(src: any): boolean;
|
|
9
|
+
export declare const isEmptyObj: (obj: object) => boolean;
|
|
10
|
+
export declare function setValidValue(target: any, key: any, value: any): void;
|
|
11
|
+
export declare function isValidStyleBind(styleBind: IDataBind): boolean;
|
|
12
|
+
export declare function isValidClassNameListBind(classNameListBind: IDataBind): boolean;
|
|
13
|
+
export declare function checkVisible({ _visible }: {
|
|
14
|
+
_visible: unknown;
|
|
15
|
+
}): boolean;
|
|
16
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/weapps-core/utils/common.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,SAAS,EAAE,MAAM,UAAU,CAAA;AAEtD,wBAAgB,cAAc,CAAC,IAAI,SAAS;IAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAA;CAAE,EAAE,CAAC,EAClE,IAAI,EAAE,IAAI,EAAE,EACZ,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,CAAC,EACrB,MAAM,GAAE,CAAC,EAAO,OASjB;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,UAIpC;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,cAAc,UAAQ,UAQ5D;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,WAE/B;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,WAErC;AAED,eAAO,MAAM,UAAU,QAAS,MAAM,YAUrC,CAAA;AAED,wBAAgB,aAAa,CAAC,MAAM,KAAA,EAAE,GAAG,KAAA,EAAE,KAAK,KAAA,QAc/C;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,SAAS,WAQpD;AAED,wBAAgB,wBAAwB,CAAC,iBAAiB,EAAE,SAAS,WAQpE;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,WAE/D"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkVisible = exports.isValidClassNameListBind = exports.isValidStyleBind = exports.setValidValue = exports.isEmptyObj = exports.isPlainObject = exports.isArray = exports.camelcase = exports.kebabCase = exports.loopDealWithFn = void 0;
|
|
4
|
+
const config_1 = require("../config");
|
|
5
|
+
const types_1 = require("../types");
|
|
6
|
+
function loopDealWithFn(data, runFn, result = []) {
|
|
7
|
+
data.map(item => {
|
|
8
|
+
if (item.children) {
|
|
9
|
+
loopDealWithFn(item.children, runFn, result);
|
|
10
|
+
}
|
|
11
|
+
result.push(runFn(item));
|
|
12
|
+
});
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
exports.loopDealWithFn = loopDealWithFn;
|
|
16
|
+
function kebabCase(str) {
|
|
17
|
+
return str.replace(config_1.KEBAB_REGEX, function (match) {
|
|
18
|
+
return '-' + match.toLowerCase();
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.kebabCase = kebabCase;
|
|
22
|
+
function camelcase(str, firstUpperCase = false) {
|
|
23
|
+
str = str.replace(/[_-]([a-z])/g, function (l) {
|
|
24
|
+
return l[1].toUpperCase();
|
|
25
|
+
});
|
|
26
|
+
if (firstUpperCase)
|
|
27
|
+
str = str.charAt(0).toUpperCase() + str.slice(1);
|
|
28
|
+
return str;
|
|
29
|
+
}
|
|
30
|
+
exports.camelcase = camelcase;
|
|
31
|
+
function isArray(src) {
|
|
32
|
+
return Object.prototype.toString.call(src) === '[object Array]';
|
|
33
|
+
}
|
|
34
|
+
exports.isArray = isArray;
|
|
35
|
+
function isPlainObject(src) {
|
|
36
|
+
return Object.prototype.toString.call(src) === '[object Object]';
|
|
37
|
+
}
|
|
38
|
+
exports.isPlainObject = isPlainObject;
|
|
39
|
+
const isEmptyObj = (obj) => {
|
|
40
|
+
if (!isPlainObject(obj)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
for (const i in obj) {
|
|
44
|
+
if (Object.prototype.hasOwnProperty.call(obj, i)) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return true;
|
|
49
|
+
};
|
|
50
|
+
exports.isEmptyObj = isEmptyObj;
|
|
51
|
+
function setValidValue(target, key, value) {
|
|
52
|
+
if (value === undefined || value === null) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (isArray(value) && value.length === 0) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (isPlainObject(value) && (0, exports.isEmptyObj)(value)) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (!target) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
target[key] = value;
|
|
65
|
+
}
|
|
66
|
+
exports.setValidValue = setValidValue;
|
|
67
|
+
function isValidStyleBind(styleBind) {
|
|
68
|
+
if (!styleBind) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
if (styleBind.propertyPath === types_1.BindPropertyPath.style && styleBind.bindDataPath) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
exports.isValidStyleBind = isValidStyleBind;
|
|
77
|
+
function isValidClassNameListBind(classNameListBind) {
|
|
78
|
+
if (!classNameListBind) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (classNameListBind.propertyPath === types_1.BindPropertyPath.classNameList) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
exports.isValidClassNameListBind = isValidClassNameListBind;
|
|
87
|
+
function checkVisible({ _visible }) {
|
|
88
|
+
return _visible !== false && _visible !== '';
|
|
89
|
+
}
|
|
90
|
+
exports.checkVisible = checkVisible;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IWeAppData, CodeType } from '../types';
|
|
2
|
+
export declare function originJsonToFileList(appData: IWeAppData): (import("../types").IWeAppCode | {
|
|
3
|
+
path: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
code: string;
|
|
7
|
+
pageId: string;
|
|
8
|
+
})[];
|
|
9
|
+
export declare function getExtByType(type: CodeType): ".js" | ".json" | ".less";
|
|
10
|
+
export declare function HACK_FIX_LOWCODE_IN(code?: string): string;
|
|
11
|
+
export declare function HACK_FIX_LOWCODE_OUT(code?: string): string;
|
|
12
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/weapps-core/utils/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAa3D,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,UAAU;;;;;;KAKvD;AA2HD,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,6BAc1C;AAID,wBAAgB,mBAAmB,CAAC,IAAI,SAAK,UAE5C;AACD,wBAAgB,oBAAoB,CAAC,IAAI,SAAK,UAE7C"}
|