@ibiz-template/runtime 0.7.41-alpha.146 → 0.7.41-alpha.148

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
@@ -31122,6 +31122,7 @@ var MDControlController = class extends ControlController {
31122
31122
  async afterLoad(args, items) {
31123
31123
  this.handleRefreshMode(args);
31124
31124
  this.calcSelectDataBySelectKey();
31125
+ this.calcToolberButtonState();
31125
31126
  return items;
31126
31127
  }
31127
31128
  /**
@@ -31286,7 +31287,6 @@ var MDControlController = class extends ControlController {
31286
31287
  });
31287
31288
  }
31288
31289
  setSelection(selection, isEmit = true) {
31289
- var _a3, _b2;
31290
31290
  const { selectedData } = this.state;
31291
31291
  if (!isElementSame(selectedData, selection)) {
31292
31292
  this.state.selectedData = selection;
@@ -31296,16 +31296,24 @@ var MDControlController = class extends ControlController {
31296
31296
  });
31297
31297
  }
31298
31298
  }
31299
- const data = selection == null ? void 0 : selection[0];
31299
+ this.calcToolberButtonState();
31300
+ }
31301
+ /**
31302
+ * @description 计算工具栏按钮状态
31303
+ * @memberof MDControlController
31304
+ */
31305
+ calcToolberButtonState() {
31306
+ var _a3, _b2;
31307
+ const data = this.state.selectedData[0];
31300
31308
  (_a3 = this.batchToolbarController) == null ? void 0 : _a3.calcButtonState(
31301
31309
  data,
31302
31310
  this.model.appDataEntityId,
31303
- { view: this.view, ctrl: this, data: selection }
31311
+ { view: this.view, ctrl: this, data: this.state.selectedData }
31304
31312
  );
31305
31313
  (_b2 = this.quickToolbarController) == null ? void 0 : _b2.calcButtonState(
31306
31314
  data,
31307
31315
  this.model.appDataEntityId,
31308
- { view: this.view, ctrl: this, data: selection }
31316
+ { view: this.view, ctrl: this, data: this.state.selectedData }
31309
31317
  );
31310
31318
  }
31311
31319
  /**
@@ -88894,18 +88902,29 @@ var AppHub = class {
88894
88902
  * @memberof AppHub
88895
88903
  */
88896
88904
  async loadMainExtensionPlugin() {
88897
- var _a3;
88905
+ var _a3, _b2;
88898
88906
  const { enableExternalPlugin, concurrentPluginCount } = ibiz.appUtil.getRuntimeDevToolConfig();
88899
88907
  if (!enableExternalPlugin) {
88900
88908
  return;
88901
88909
  }
88902
88910
  let pluginListLength = 0;
88903
- const res = await ibiz.net.axios({
88904
- method: "get",
88905
- url: "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.remoteModelUrl, "/extension")
88906
- });
88907
- if (res.status === 200 && res.data) {
88908
- pluginListLength = Number(res.data);
88911
+ const extensionUrl = "".concat(ibiz.env.baseUrl, "/").concat(ibiz.env.appId).concat(ibiz.env.remoteModelUrl, "/extension");
88912
+ try {
88913
+ const res = await ibiz.net.axios({
88914
+ method: "get",
88915
+ url: extensionUrl
88916
+ });
88917
+ if (res.status === 200 && res.data) {
88918
+ pluginListLength = Number(res.data);
88919
+ }
88920
+ } catch (error) {
88921
+ ibiz.log.error(
88922
+ ibiz.i18n.t("runtime.hub.loadExtensionCountFail", {
88923
+ targetUrl: extensionUrl,
88924
+ error: (_a3 = error == null ? void 0 : error.message) != null ? _a3 : String(error)
88925
+ })
88926
+ );
88927
+ return;
88909
88928
  }
88910
88929
  if (pluginListLength === 0)
88911
88930
  return;
@@ -88935,7 +88954,7 @@ var AppHub = class {
88935
88954
  if (errorResults && errorResults.length > 0) {
88936
88955
  ibiz.log.warn(
88937
88956
  ibiz.i18n.t("runtime.hub.noExtensionPlugin", {
88938
- targetUrl: ((_a3 = errorResults[0].data) == null ? void 0 : _a3.targetUrl) || "Unknown"
88957
+ targetUrl: ((_b2 = errorResults[0].data) == null ? void 0 : _b2.targetUrl) || "Unknown"
88939
88958
  })
88940
88959
  );
88941
88960
  }
@@ -92838,7 +92857,8 @@ var en = {
92838
92857
  hub: {
92839
92858
  failedParse: "View parameter {paramsName} failed to parse: {error}",
92840
92859
  noExist: "View [{id}] does not exist",
92841
- noExtensionPlugin: "Attempted to load the extension plugin from path [{targetUrl}], but no extension plugin was found"
92860
+ noExtensionPlugin: "Attempted to load the extension plugin from path [{targetUrl}], but no extension plugin was found",
92861
+ loadExtensionCountFail: "Failed to get the number of main app extension plugins, request path [{targetUrl}]: {error}"
92842
92862
  },
92843
92863
  logicScheduler: {
92844
92864
  executor: {
@@ -93551,7 +93571,8 @@ var zhCn = {
93551
93571
  hub: {
93552
93572
  failedParse: "\u89C6\u56FE\u53C2\u6570 {paramsName} \u89E3\u6790\u5931\u8D25\uFF1A{error}",
93553
93573
  noExist: "\u89C6\u56FE[{id}]\u4E0D\u5B58\u5728",
93554
- noExtensionPlugin: "\u5C1D\u8BD5\u52A0\u8F7D\u8DEF\u5F84[{targetUrl}]\u6269\u5C55\u63D2\u4EF6\uFF0C\u6682\u672A\u627E\u5230\u6269\u5C55\u63D2\u4EF6"
93574
+ noExtensionPlugin: "\u5C1D\u8BD5\u52A0\u8F7D\u8DEF\u5F84[{targetUrl}]\u6269\u5C55\u63D2\u4EF6\uFF0C\u6682\u672A\u627E\u5230\u6269\u5C55\u63D2\u4EF6",
93575
+ loadExtensionCountFail: "\u83B7\u53D6\u4E3B\u5E94\u7528\u6269\u5C55\u63D2\u4EF6\u603B\u6570\u5931\u8D25\uFF0C\u8BF7\u6C42\u8DEF\u5F84[{targetUrl}]\uFF1A{error}"
93555
93576
  },
93556
93577
  logicScheduler: {
93557
93578
  executor: {