@ibiz-template/runtime 0.7.41-alpha.145 → 0.7.41-alpha.146
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/index.esm.js +55 -0
- package/dist/index.system.min.js +1 -1
- package/out/utils/layout-panel-util/layout-panel-util.d.ts +17 -1
- package/out/utils/layout-panel-util/layout-panel-util.d.ts.map +1 -1
- package/out/utils/layout-panel-util/layout-panel-util.js +49 -0
- package/package.json +2 -2
- package/src/utils/layout-panel-util/layout-panel-util.ts +66 -0
package/dist/index.esm.js
CHANGED
|
@@ -23318,6 +23318,11 @@ var LayoutPanelUtil = class {
|
|
|
23318
23318
|
layout.controls = viewModel.controls;
|
|
23319
23319
|
delete viewModel.controls;
|
|
23320
23320
|
}
|
|
23321
|
+
if (["DEMPICKUPVIEW", "DEMPICKUPVIEW2", "DEMOBMPICKUPVIEW"].includes(
|
|
23322
|
+
viewModel.viewType
|
|
23323
|
+
)) {
|
|
23324
|
+
this.replaceSimpleList(viewModel);
|
|
23325
|
+
}
|
|
23321
23326
|
}
|
|
23322
23327
|
}
|
|
23323
23328
|
return viewModel;
|
|
@@ -23411,6 +23416,56 @@ var LayoutPanelUtil = class {
|
|
|
23411
23416
|
}
|
|
23412
23417
|
return "".concat(viewType, "_").concat(viewStyle);
|
|
23413
23418
|
}
|
|
23419
|
+
/**
|
|
23420
|
+
* @description 递归查找指定标识的面板项
|
|
23421
|
+
* @protected
|
|
23422
|
+
* @param {IPanelItem[]} items
|
|
23423
|
+
* @param {string} id
|
|
23424
|
+
* @returns {*} {(IPanelItem | undefined)}
|
|
23425
|
+
* @memberof LayoutPanelUtil
|
|
23426
|
+
*/
|
|
23427
|
+
findPanelItem(items, id) {
|
|
23428
|
+
for (let i = 0; i < items.length; i++) {
|
|
23429
|
+
const item = items[i];
|
|
23430
|
+
if (item.id === id) {
|
|
23431
|
+
return item;
|
|
23432
|
+
}
|
|
23433
|
+
const children = item.panelItems;
|
|
23434
|
+
if (children == null ? void 0 : children.length) {
|
|
23435
|
+
const result = this.findPanelItem(children, id);
|
|
23436
|
+
if (result) {
|
|
23437
|
+
return result;
|
|
23438
|
+
}
|
|
23439
|
+
}
|
|
23440
|
+
}
|
|
23441
|
+
return void 0;
|
|
23442
|
+
}
|
|
23443
|
+
/**
|
|
23444
|
+
* @description 替换简单列表部件占位
|
|
23445
|
+
* @protected
|
|
23446
|
+
* @param {IAppView} viewModel
|
|
23447
|
+
* @memberof LayoutPanelUtil
|
|
23448
|
+
*/
|
|
23449
|
+
replaceSimpleList(viewModel) {
|
|
23450
|
+
const layout = viewModel.viewLayoutPanel;
|
|
23451
|
+
const { controls = [] } = layout;
|
|
23452
|
+
const simpleListControl = controls.find(
|
|
23453
|
+
(control) => control.name === "simplelist"
|
|
23454
|
+
);
|
|
23455
|
+
if (!simpleListControl) {
|
|
23456
|
+
const simpleListItem = this.findPanelItem(
|
|
23457
|
+
layout.rootPanelItems,
|
|
23458
|
+
"simplelist"
|
|
23459
|
+
);
|
|
23460
|
+
if (simpleListItem) {
|
|
23461
|
+
simpleListItem.itemType = "RAWITEM";
|
|
23462
|
+
simpleListItem.rawItem = {
|
|
23463
|
+
predefinedType: "SIMPLELIST",
|
|
23464
|
+
appId: simpleListItem.appId
|
|
23465
|
+
};
|
|
23466
|
+
}
|
|
23467
|
+
}
|
|
23468
|
+
}
|
|
23414
23469
|
};
|
|
23415
23470
|
|
|
23416
23471
|
// src/utils/wf-helper/wf-helper.ts
|