@cloudbase/lowcode-builder 1.8.44-alpha.0 → 1.8.44-alpha.2
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/dist/builder.web.js +1 -1
- package/lib/builder/config/index.d.ts +1 -1
- package/lib/builder/config/index.js +1 -1
- package/lib/builder/mp/index.js +8 -9
- package/lib/builder.web.js +1 -1
- package/lib/utils/transform.d.ts +1 -1
- package/lib/utils/transform.js +69 -63
- package/package.json +1 -1
- package/template/mp/common/modal/index.js +200 -0
- package/template/mp/common/modal/index.json +5 -0
- package/template/mp/common/modal/index.wxml +16 -0
- package/template/mp/common/modal/index.wxss +1 -0
- package/template/mp/common/modal/wd-modal.wxss +177 -0
- package/template/mp/common/privacyModal/index.json +2 -5
- package/template/mp/common/privacyModal/index.wxml +8 -8
- package/template/mp/common/privacyModal/index.wxss +15 -2
- package/template/mp/common/util.js +3 -16
- package/template/mp/page/api.js +1 -3
|
@@ -6,7 +6,7 @@ export declare const materialsDirName = "materials";
|
|
|
6
6
|
* src/template的代码,在IDE编辑器插件中构建builder
|
|
7
7
|
* 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488®ion=ap-shanghai&path=%252Flcap-builder%252F
|
|
8
8
|
*/
|
|
9
|
-
export declare const builderTemplateURL = "https://comp-public-1303824488.file.myqcloud.com/lcap-builder/template.1.8.
|
|
9
|
+
export declare const builderTemplateURL = "https://comp-public-1303824488.file.myqcloud.com/lcap-builder/template.1.8.45.zip";
|
|
10
10
|
/**
|
|
11
11
|
* miniprogram的代码,IDE插件后续会提供端功能
|
|
12
12
|
* 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488®ion=ap-shanghai&path=%252Flcap-builder%252F
|
|
@@ -45,7 +45,7 @@ exports.materialsDirName = 'materials'; // materials diretory of current project
|
|
|
45
45
|
* src/template的代码,在IDE编辑器插件中构建builder
|
|
46
46
|
* 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488®ion=ap-shanghai&path=%252Flcap-builder%252F
|
|
47
47
|
*/
|
|
48
|
-
exports.builderTemplateURL = 'https://comp-public-1303824488.file.myqcloud.com/lcap-builder/template.1.8.
|
|
48
|
+
exports.builderTemplateURL = 'https://comp-public-1303824488.file.myqcloud.com/lcap-builder/template.1.8.45.zip';
|
|
49
49
|
/**
|
|
50
50
|
* miniprogram的代码,IDE插件后续会提供端功能
|
|
51
51
|
* 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488®ion=ap-shanghai&path=%252Flcap-builder%252F
|
package/lib/builder/mp/index.js
CHANGED
|
@@ -138,6 +138,7 @@ async function generateWxMp({ buildContext, weapps, calses, plugins, deployOptio
|
|
|
138
138
|
'common/flow.js': {},
|
|
139
139
|
'common/info': {},
|
|
140
140
|
'common/privacyModal': {},
|
|
141
|
+
'common/modal': {},
|
|
141
142
|
/**
|
|
142
143
|
* 调试用
|
|
143
144
|
*/
|
|
@@ -325,7 +326,7 @@ async function generatePkg(ctx, weapp, appRoot, pageConfigs) {
|
|
|
325
326
|
console.log(`Generating ${em('page')} files`);
|
|
326
327
|
(0, generateFiles_1.cleanDir)(path_1.default.join(appRoot, 'pages'), []);
|
|
327
328
|
await Promise.all(weapp.pageInstanceList.map(async (page, index) => {
|
|
328
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
329
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
329
330
|
// # Generating page
|
|
330
331
|
const rootPath = weapp.rootPath || '';
|
|
331
332
|
const usingComponents = {};
|
|
@@ -346,10 +347,8 @@ async function generatePkg(ctx, weapp, appRoot, pageConfigs) {
|
|
|
346
347
|
const pageFileData = {
|
|
347
348
|
[`api.js|api.js`]: {
|
|
348
349
|
subLevelPath: rootPath ? `${path_1.default.posix.relative(rootPath, '')}/` : '',
|
|
349
|
-
packageName: rootPath || '',
|
|
350
|
-
subAppId: rootPath ? ((_a = weapp.extra) === null || _a === void 0 ? void 0 : _a.id) || weapp.id || '' : '',
|
|
351
350
|
uuid: rootPath ? `${rootPath}/${page.id}` : page.id,
|
|
352
|
-
label: ((
|
|
351
|
+
label: ((_b = (_a = page === null || page === void 0 ? void 0 : page.data) === null || _a === void 0 ? void 0 : _a.navigationBarTitleText) === null || _b === void 0 ? void 0 : _b.value) || ((_d = (_c = page === null || page === void 0 ? void 0 : page.data) === null || _c === void 0 ? void 0 : _c.title) === null || _d === void 0 ? void 0 : _d.value),
|
|
353
352
|
},
|
|
354
353
|
[`data.js|data.js`]: {
|
|
355
354
|
widgetProps: (0, util_2.createWidgetProps)(ctx, componentInstances),
|
|
@@ -362,16 +361,16 @@ async function generatePkg(ctx, weapp, appRoot, pageConfigs) {
|
|
|
362
361
|
eventHandlers: (0, util_2.createEventHandlers)(ctx, componentInstances, 'this', page),
|
|
363
362
|
dataBinds: (0, util_2.createDataBinds)(ctx, componentInstances),
|
|
364
363
|
pageAttributes: {
|
|
365
|
-
...(((
|
|
364
|
+
...(((_e = page.data) === null || _e === void 0 ? void 0 : _e.appShareMessage) ? { appShareMessage: page.data.appShareMessage.value } : {}),
|
|
366
365
|
},
|
|
367
366
|
debug: ctx.debugMode,
|
|
368
367
|
stringifyObj: util_1.inspect,
|
|
369
368
|
subLevelPath: rootPath ? `${path_1.default.posix.relative(rootPath, '')}/` : '',
|
|
370
369
|
importor,
|
|
371
|
-
query: (0, util_2.createTemplateQuery)(ctx, (
|
|
370
|
+
query: (0, util_2.createTemplateQuery)(ctx, (_f = page.dataset) === null || _f === void 0 ? void 0 : _f.query),
|
|
372
371
|
eventFlows: (0, util_2.createTemplateEventFlows)(ctx, page.eventFlows),
|
|
373
|
-
resetShare: ((
|
|
374
|
-
((
|
|
372
|
+
resetShare: ((_j = (_h = (_g = page === null || page === void 0 ? void 0 : page.data) === null || _g === void 0 ? void 0 : _g.appShareMessage) === null || _h === void 0 ? void 0 : _h.value) === null || _j === void 0 ? void 0 : _j.enable) ||
|
|
373
|
+
((_k = allAppUsedComps === null || allAppUsedComps === void 0 ? void 0 : allAppUsedComps[cals_1.OFFICIAL_LIB_KEY]) === null || _k === void 0 ? void 0 : _k.has('Share')) ||
|
|
375
374
|
/* 从 enablePageRoot 的版本开始支持按需reset share
|
|
376
375
|
* 否则默认都开启
|
|
377
376
|
*/ !ctx.enablePageRoot,
|
|
@@ -385,7 +384,7 @@ async function generatePkg(ctx, weapp, appRoot, pageConfigs) {
|
|
|
385
384
|
content: wxml,
|
|
386
385
|
},
|
|
387
386
|
[`index.wxss|${pageFileName}.wxss`]: {
|
|
388
|
-
subWxss: rootPath && !((
|
|
387
|
+
subWxss: rootPath && !((_l = ctx.mainAppData) === null || _l === void 0 ? void 0 : _l.mpPkgUrl)
|
|
389
388
|
? `@import "${path_1.default.posix.relative(`/${rootPath}/pages/${page.id}`, '/lowcode')}/style.wxss";`
|
|
390
389
|
: '',
|
|
391
390
|
content: (0, weapps_core_1.toCssText)((0, cals_1.processCommonStyle2CSSProperties)(page.commonStyle, {
|