@ibiz-template/runtime 0.7.41-alpha.145 → 0.7.41-alpha.147

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 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
@@ -88839,18 +88894,29 @@ var AppHub = class {
88839
88894
  * @memberof AppHub
88840
88895
  */
88841
88896
  async loadMainExtensionPlugin() {
88842
- var _a3;
88897
+ var _a3, _b2;
88843
88898
  const { enableExternalPlugin, concurrentPluginCount } = ibiz.appUtil.getRuntimeDevToolConfig();
88844
88899
  if (!enableExternalPlugin) {
88845
88900
  return;
88846
88901
  }
88847
88902
  let pluginListLength = 0;
88848
- const res = await ibiz.net.axios({
88849
- method: "get",
88850
- url: "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.remoteModelUrl, "/extension")
88851
- });
88852
- if (res.status === 200 && res.data) {
88853
- pluginListLength = Number(res.data);
88903
+ const extensionUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.remoteModelUrl, "/extension");
88904
+ try {
88905
+ const res = await ibiz.net.axios({
88906
+ method: "get",
88907
+ url: extensionUrl
88908
+ });
88909
+ if (res.status === 200 && res.data) {
88910
+ pluginListLength = Number(res.data);
88911
+ }
88912
+ } catch (error) {
88913
+ ibiz.log.error(
88914
+ ibiz.i18n.t("runtime.hub.loadExtensionCountFail", {
88915
+ targetUrl: extensionUrl,
88916
+ error: (_a3 = error == null ? void 0 : error.message) != null ? _a3 : String(error)
88917
+ })
88918
+ );
88919
+ return;
88854
88920
  }
88855
88921
  if (pluginListLength === 0)
88856
88922
  return;
@@ -88880,7 +88946,7 @@ var AppHub = class {
88880
88946
  if (errorResults && errorResults.length > 0) {
88881
88947
  ibiz.log.warn(
88882
88948
  ibiz.i18n.t("runtime.hub.noExtensionPlugin", {
88883
- targetUrl: ((_a3 = errorResults[0].data) == null ? void 0 : _a3.targetUrl) || "Unknown"
88949
+ targetUrl: ((_b2 = errorResults[0].data) == null ? void 0 : _b2.targetUrl) || "Unknown"
88884
88950
  })
88885
88951
  );
88886
88952
  }
@@ -92783,7 +92849,8 @@ var en = {
92783
92849
  hub: {
92784
92850
  failedParse: "View parameter {paramsName} failed to parse: {error}",
92785
92851
  noExist: "View [{id}] does not exist",
92786
- noExtensionPlugin: "Attempted to load the extension plugin from path [{targetUrl}], but no extension plugin was found"
92852
+ noExtensionPlugin: "Attempted to load the extension plugin from path [{targetUrl}], but no extension plugin was found",
92853
+ loadExtensionCountFail: "Failed to get the number of main app extension plugins, request path [{targetUrl}]: {error}"
92787
92854
  },
92788
92855
  logicScheduler: {
92789
92856
  executor: {
@@ -93496,7 +93563,8 @@ var zhCn = {
93496
93563
  hub: {
93497
93564
  failedParse: "\u89C6\u56FE\u53C2\u6570 {paramsName} \u89E3\u6790\u5931\u8D25\uFF1A{error}",
93498
93565
  noExist: "\u89C6\u56FE[{id}]\u4E0D\u5B58\u5728",
93499
- noExtensionPlugin: "\u5C1D\u8BD5\u52A0\u8F7D\u8DEF\u5F84[{targetUrl}]\u6269\u5C55\u63D2\u4EF6\uFF0C\u6682\u672A\u627E\u5230\u6269\u5C55\u63D2\u4EF6"
93566
+ noExtensionPlugin: "\u5C1D\u8BD5\u52A0\u8F7D\u8DEF\u5F84[{targetUrl}]\u6269\u5C55\u63D2\u4EF6\uFF0C\u6682\u672A\u627E\u5230\u6269\u5C55\u63D2\u4EF6",
93567
+ loadExtensionCountFail: "\u83B7\u53D6\u4E3B\u5E94\u7528\u6269\u5C55\u63D2\u4EF6\u603B\u6570\u5931\u8D25\uFF0C\u8BF7\u6C42\u8DEF\u5F84[{targetUrl}]\uFF1A{error}"
93500
93568
  },
93501
93569
  logicScheduler: {
93502
93570
  executor: {