@ibiz-template/runtime 0.7.41-alpha.91 → 0.7.41-alpha.93

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.
Files changed (29) hide show
  1. package/dist/index.esm.js +60 -2
  2. package/dist/index.system.min.js +1 -1
  3. package/out/app-hub.d.ts +9 -1
  4. package/out/app-hub.d.ts.map +1 -1
  5. package/out/app-hub.js +13 -0
  6. package/out/application.d.ts +5 -0
  7. package/out/application.d.ts.map +1 -1
  8. package/out/application.js +19 -0
  9. package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
  10. package/out/controller/control/panel/panel/panel-item.controller.js +3 -1
  11. package/out/controller/control/search-bar/search-bar.controller.d.ts +6 -0
  12. package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
  13. package/out/controller/control/search-bar/search-bar.controller.js +14 -0
  14. package/out/interface/api/controller/control/i-api-tree.controller.d.ts +1 -2
  15. package/out/interface/api/controller/control/i-api-tree.controller.d.ts.map +1 -1
  16. package/out/interface/api/state/control/i-api-chart.state.d.ts +13 -0
  17. package/out/interface/api/state/control/i-api-chart.state.d.ts.map +1 -1
  18. package/out/interface/api/state/control/i-api-tree.state.d.ts +4 -4
  19. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +9 -1
  20. package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
  21. package/out/interface/controller/state/control/i-chart.state.d.ts +0 -12
  22. package/out/interface/controller/state/control/i-chart.state.d.ts.map +1 -1
  23. package/out/interface/provider/model-loader.provider.d.ts +9 -1
  24. package/out/interface/provider/model-loader.provider.d.ts.map +1 -1
  25. package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
  26. package/out/service/service/code-list/code-list.service.js +5 -0
  27. package/out/service/service/entity/method/method.d.ts.map +1 -1
  28. package/out/service/service/entity/method/method.js +5 -1
  29. package/package.json +2 -2
package/dist/index.esm.js CHANGED
@@ -42439,6 +42439,20 @@ var SearchBarController = class extends ControlController {
42439
42439
  this.counter.destroy();
42440
42440
  }
42441
42441
  }
42442
+ /**
42443
+ * @description 转换各类多语言
42444
+ * @protected
42445
+ * @memberof SearchBarController
42446
+ */
42447
+ convertMultipleLanguages() {
42448
+ const { searchBarGroups = [] } = this.model;
42449
+ searchBarGroups.forEach((item) => {
42450
+ var _a3;
42451
+ if ((_a3 = item.capLanguageRes) == null ? void 0 : _a3.lanResTag) {
42452
+ item.caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
42453
+ }
42454
+ });
42455
+ }
42442
42456
  };
42443
42457
 
42444
42458
  // src/controller/control/dashboard/portlet/filter-portlet/filter-portlet.controller.ts
@@ -56239,7 +56253,7 @@ var PanelItemController = class {
56239
56253
  await this.onInit();
56240
56254
  }
56241
56255
  async onInit() {
56242
- const { layoutPos, sysCss, labelSysCss } = this.model;
56256
+ const { layoutPos, sysCss, labelSysCss, caption, capLanguageRes } = this.model;
56243
56257
  if (layoutPos) {
56244
56258
  const { width, height } = calcLayoutHeightWidth(layoutPos);
56245
56259
  this.state.layout.width = "".concat(width);
@@ -56253,6 +56267,8 @@ var PanelItemController = class {
56253
56267
  }
56254
56268
  this.handleCounterChange = this.handleCounterChange.bind(this);
56255
56269
  this.initCounter();
56270
+ if (capLanguageRes == null ? void 0 : capLanguageRes.lanResTag)
56271
+ this.model.caption = ibiz.i18n.t(capLanguageRes.lanResTag, caption);
56256
56272
  }
56257
56273
  /**
56258
56274
  * @description 初始化计数器
@@ -69480,12 +69496,16 @@ var CodeListService = class {
69480
69496
  * @return {*} {Promise<CodeListItem[]>}
69481
69497
  */
69482
69498
  async get(tag, context, params) {
69499
+ var _a3;
69483
69500
  const codeList = this.allCodeLists.get(tag);
69484
69501
  if (!codeList) {
69485
69502
  throw new RuntimeError57(
69486
69503
  ibiz.i18n.t("runtime.service.noFindCodeList", { tag })
69487
69504
  );
69488
69505
  }
69506
+ if ((_a3 = codeList.emptyTextLanguageRes) == null ? void 0 : _a3.lanResTag) {
69507
+ codeList.emptyText = ibiz.i18n.t(codeList.emptyTextLanguageRes.lanResTag);
69508
+ }
69489
69509
  if (codeList.codeListType === "STATIC") {
69490
69510
  return this.getStatic(codeList);
69491
69511
  }
@@ -71725,7 +71745,7 @@ import { ascSort } from "qx-util";
71725
71745
  import { clone as clone52 } from "ramda";
71726
71746
 
71727
71747
  // src/service/service/entity/method/method.ts
71728
- import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
71748
+ import { HttpResponse as HttpResponse4, RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
71729
71749
 
71730
71750
  // src/service/service/entity/method/method-input.ts
71731
71751
  var MethodInput = class {
@@ -71957,6 +71977,9 @@ var Method = class {
71957
71977
  }
71958
71978
  return res;
71959
71979
  }
71980
+ if (actionType === "SCRIPT") {
71981
+ return new HttpResponse4(data);
71982
+ }
71960
71983
  throw new RuntimeModelError69(
71961
71984
  this.method,
71962
71985
  ibiz.i18n.t("runtime.service.unsupportedBehaviorTypes", { actionType })
@@ -85006,9 +85029,31 @@ var Application = class {
85006
85029
  async init() {
85007
85030
  await this.authority.init();
85008
85031
  await this.loadAppModelStyle();
85032
+ await this.loadAppLang();
85009
85033
  await this.loadGlobalAppUtil();
85010
85034
  await this.loadReplaceDefaultPlugin();
85011
85035
  }
85036
+ /**
85037
+ * 加载应用多语言
85038
+ *
85039
+ */
85040
+ async loadAppLang() {
85041
+ if (ibiz.env.isEnableMultiLan) {
85042
+ const lang = ibiz.i18n.getLang();
85043
+ const m = await ibiz.hub.getPSAppLang(
85044
+ lang.replace("-", "_").toUpperCase(),
85045
+ this.appId
85046
+ );
85047
+ if (m && m.languageItems) {
85048
+ const items = m.languageItems || [];
85049
+ const data = {};
85050
+ items.forEach((item) => {
85051
+ data[item.lanResTag] = item.content;
85052
+ });
85053
+ ibiz.i18n.mergeLocaleMessage(lang, data);
85054
+ }
85055
+ }
85056
+ }
85012
85057
  /**
85013
85058
  * 加载应用模型全局样式
85014
85059
  *
@@ -86246,6 +86291,19 @@ var AppHub = class {
86246
86291
  const id = this.calcAppViewId(tag);
86247
86292
  return this.view2appMap.has(id);
86248
86293
  }
86294
+ /**
86295
+ * 获取多语言资源
86296
+ *
86297
+ * @param language
86298
+ * @param appId
86299
+ * @returns
86300
+ */
86301
+ async getPSAppLang(language, appId2) {
86302
+ if (this.modelLoaderProvider) {
86303
+ return this.modelLoaderProvider.getPSAppLang(language, appId2);
86304
+ }
86305
+ return null;
86306
+ }
86249
86307
  /**
86250
86308
  * 获取应用样式
86251
86309
  *