@ibiz-template/runtime 0.7.41-alpha.141 → 0.7.41-alpha.143

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
@@ -76054,7 +76054,13 @@ var AIUtilService = class {
76054
76054
  response,
76055
76055
  "messagemodelMapping"
76056
76056
  );
76057
- return result;
76057
+ let total = response.headers["x-total"];
76058
+ if (total) {
76059
+ total = Number(total);
76060
+ } else {
76061
+ total = result.length;
76062
+ }
76063
+ return { total, data: result.reverse() };
76058
76064
  }
76059
76065
  /**
76060
76066
  * 删除消息(多个以逗号分割)
@@ -88834,6 +88840,7 @@ var AppHub = class {
88834
88840
  }
88835
88841
  if (pluginListLength === 0)
88836
88842
  return;
88843
+ ibiz.__TEMPAPPID__ = ibiz.env.appId.split("__")[1];
88837
88844
  const pluginTasks = Array.from({ length: pluginListLength }, (_, i) => {
88838
88845
  const index = i + 1;
88839
88846
  const suffix = index === 1 ? "" : "".concat(index);
@@ -88863,6 +88870,7 @@ var AppHub = class {
88863
88870
  })
88864
88871
  );
88865
88872
  }
88873
+ ibiz.__TEMPAPPID__ = "";
88866
88874
  }
88867
88875
  /**
88868
88876
  * @description 加载指定子应用扩展插件
@@ -88871,24 +88879,56 @@ var AppHub = class {
88871
88879
  * @memberof AppHub
88872
88880
  */
88873
88881
  async loadSubExtensionPlugin(appId2) {
88874
- const { enableExternalPlugin } = ibiz.appUtil.getRuntimeDevToolConfig();
88882
+ var _a3;
88883
+ const { enableExternalPlugin, concurrentPluginCount } = ibiz.appUtil.getRuntimeDevToolConfig();
88875
88884
  if (!enableExternalPlugin) {
88876
88885
  return;
88877
88886
  }
88878
- const targetUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.remoteModelUrl, "/subapps/").concat(appId2, "/ext");
88879
- try {
88880
- await ibiz.plugin.loadPlugin({
88881
- runtimeObject: true,
88882
- rtobjectName: "".concat(appId2, "_ExtensionPlugin"),
88883
- rtobjectRepo: targetUrl
88884
- });
88885
- } catch (error) {
88887
+ let pluginListLength = 0;
88888
+ const mainApp = this.getAppSourceModel(ibiz.env.appId);
88889
+ if (mainApp && mainApp.getAllPSSubAppRefs) {
88890
+ const targetSubApp = mainApp.getAllPSSubAppRefs.find(
88891
+ (subAppRef) => {
88892
+ return subAppRef.id === appId2;
88893
+ }
88894
+ );
88895
+ if (targetSubApp && targetSubApp.ext_count) {
88896
+ pluginListLength = Number(targetSubApp.ext_count);
88897
+ }
88898
+ }
88899
+ if (pluginListLength === 0)
88900
+ return;
88901
+ ibiz.__TEMPAPPID__ = appId2.split("__")[2];
88902
+ const pluginTasks = Array.from({ length: pluginListLength }, (_, i) => {
88903
+ const index = i + 1;
88904
+ const suffix = index === 1 ? "" : "".concat(index);
88905
+ const targetUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.remoteModelUrl, "/subapps/").concat(appId2, "/ext").concat(suffix);
88906
+ return async () => {
88907
+ try {
88908
+ await ibiz.plugin.loadPlugin({
88909
+ runtimeObject: true,
88910
+ rtobjectName: "".concat(appId2, "_ExtensionPlugin").concat(suffix),
88911
+ rtobjectRepo: targetUrl
88912
+ });
88913
+ return { ok: true, data: { index, targetUrl } };
88914
+ } catch (error) {
88915
+ return { ok: false, data: { index, targetUrl, error } };
88916
+ }
88917
+ };
88918
+ });
88919
+ const results = await runWithConcurrency(
88920
+ pluginTasks,
88921
+ concurrentPluginCount || 1
88922
+ );
88923
+ const errorResults = results.filter((result) => !(result == null ? void 0 : result.ok));
88924
+ if (errorResults && errorResults.length > 0) {
88886
88925
  ibiz.log.warn(
88887
88926
  ibiz.i18n.t("runtime.hub.noExtensionPlugin", {
88888
- targetUrl
88927
+ targetUrl: ((_a3 = errorResults[0].data) == null ? void 0 : _a3.targetUrl) || "Unknown"
88889
88928
  })
88890
88929
  );
88891
88930
  }
88931
+ ibiz.__TEMPAPPID__ = "";
88892
88932
  }
88893
88933
  /**
88894
88934
  * 新建 hub 应用
@@ -93921,8 +93961,10 @@ export {
93921
93961
  FormItemState,
93922
93962
  FormMDCtrlController,
93923
93963
  FormMDCtrlFormController,
93964
+ FormMDCtrlFormState,
93924
93965
  FormMDCtrlMDController,
93925
93966
  FormMDCtrlRepeaterController,
93967
+ FormMDCtrlState,
93926
93968
  FormNotifyState,
93927
93969
  FormPageController,
93928
93970
  FormPageState,