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

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 (27) hide show
  1. package/dist/index.esm.js +56 -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/entity/method/method.d.ts.map +1 -1
  26. package/out/service/service/entity/method/method.js +5 -1
  27. 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 初始化计数器
@@ -71725,7 +71741,7 @@ import { ascSort } from "qx-util";
71725
71741
  import { clone as clone52 } from "ramda";
71726
71742
 
71727
71743
  // src/service/service/entity/method/method.ts
71728
- import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
71744
+ import { HttpResponse as HttpResponse4, RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
71729
71745
 
71730
71746
  // src/service/service/entity/method/method-input.ts
71731
71747
  var MethodInput = class {
@@ -71957,6 +71973,9 @@ var Method = class {
71957
71973
  }
71958
71974
  return res;
71959
71975
  }
71976
+ if (actionType === "SCRIPT") {
71977
+ return new HttpResponse4(data);
71978
+ }
71960
71979
  throw new RuntimeModelError69(
71961
71980
  this.method,
71962
71981
  ibiz.i18n.t("runtime.service.unsupportedBehaviorTypes", { actionType })
@@ -85006,9 +85025,31 @@ var Application = class {
85006
85025
  async init() {
85007
85026
  await this.authority.init();
85008
85027
  await this.loadAppModelStyle();
85028
+ await this.loadAppLang();
85009
85029
  await this.loadGlobalAppUtil();
85010
85030
  await this.loadReplaceDefaultPlugin();
85011
85031
  }
85032
+ /**
85033
+ * 加载应用多语言
85034
+ *
85035
+ */
85036
+ async loadAppLang() {
85037
+ if (ibiz.env.isEnableMultiLan) {
85038
+ const lang = ibiz.i18n.getLang();
85039
+ const m = await ibiz.hub.getPSAppLang(
85040
+ lang.replace("-", "_").toUpperCase(),
85041
+ this.appId
85042
+ );
85043
+ if (m && m.languageItems) {
85044
+ const items = m.languageItems || [];
85045
+ const data = {};
85046
+ items.forEach((item) => {
85047
+ data[item.lanResTag] = item.content;
85048
+ });
85049
+ ibiz.i18n.mergeLocaleMessage(lang, data);
85050
+ }
85051
+ }
85052
+ }
85012
85053
  /**
85013
85054
  * 加载应用模型全局样式
85014
85055
  *
@@ -86246,6 +86287,19 @@ var AppHub = class {
86246
86287
  const id = this.calcAppViewId(tag);
86247
86288
  return this.view2appMap.has(id);
86248
86289
  }
86290
+ /**
86291
+ * 获取多语言资源
86292
+ *
86293
+ * @param language
86294
+ * @param appId
86295
+ * @returns
86296
+ */
86297
+ async getPSAppLang(language, appId2) {
86298
+ if (this.modelLoaderProvider) {
86299
+ return this.modelLoaderProvider.getPSAppLang(language, appId2);
86300
+ }
86301
+ return null;
86302
+ }
86249
86303
  /**
86250
86304
  * 获取应用样式
86251
86305
  *