@ibiz-template/runtime 0.7.41-alpha.127 → 0.7.41-alpha.128

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 (38) hide show
  1. package/dist/index.esm.js +59 -11
  2. package/dist/index.system.min.js +1 -1
  3. package/out/config/global-config.d.ts +7 -1
  4. package/out/config/global-config.d.ts.map +1 -1
  5. package/out/config/global-config.js +20 -0
  6. package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +8 -0
  7. package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
  8. package/out/interface/api/common/global-config/i-api-global-config.d.ts +7 -0
  9. package/out/interface/api/common/global-config/i-api-global-config.d.ts.map +1 -1
  10. package/out/interface/api/common/global-config/i-api-global-img-assets.d.ts +92 -0
  11. package/out/interface/api/common/global-config/i-api-global-img-assets.d.ts.map +1 -0
  12. package/out/interface/api/common/global-config/i-api-global-img-assets.js +1 -0
  13. package/out/interface/api/common/global-config/index.d.ts +1 -0
  14. package/out/interface/api/common/global-config/index.d.ts.map +1 -1
  15. package/out/interface/common/i-global-config/i-global-img-assets.d.ts +10 -0
  16. package/out/interface/common/i-global-config/i-global-img-assets.d.ts.map +1 -0
  17. package/out/interface/common/i-global-config/i-global-img-assets.js +1 -0
  18. package/out/interface/common/i-global-config/index.d.ts +1 -0
  19. package/out/interface/common/i-global-config/index.d.ts.map +1 -1
  20. package/out/interface/common/i-global-config/index.js +1 -0
  21. package/out/interface/common/index.d.ts +1 -1
  22. package/out/interface/common/index.d.ts.map +1 -1
  23. package/out/register/custom-register.d.ts.map +1 -1
  24. package/out/register/custom-register.js +5 -0
  25. package/out/utils/theme-util/theme-util.d.ts +9 -1
  26. package/out/utils/theme-util/theme-util.d.ts.map +1 -1
  27. package/out/utils/theme-util/theme-util.js +38 -12
  28. package/package.json +2 -2
  29. package/src/config/global-config.ts +22 -0
  30. package/src/interface/api/common/global-config/i-api-global-common-config.ts +9 -0
  31. package/src/interface/api/common/global-config/i-api-global-config.ts +8 -0
  32. package/src/interface/api/common/global-config/i-api-global-img-assets.ts +102 -0
  33. package/src/interface/api/common/global-config/index.ts +1 -0
  34. package/src/interface/common/i-global-config/i-global-img-assets.ts +9 -0
  35. package/src/interface/common/i-global-config/index.ts +1 -0
  36. package/src/interface/common/index.ts +1 -0
  37. package/src/register/custom-register.ts +5 -0
  38. package/src/utils/theme-util/theme-util.ts +39 -12
package/dist/index.esm.js CHANGED
@@ -19990,6 +19990,7 @@ var GlobalConfig = class {
19990
19990
  mergeAppMenu: "default",
19991
19991
  enableAIMinimize: true,
19992
19992
  aiChatTopicCaptionMode: "default",
19993
+ aiChatTopicCaptionComputedMode: "question",
19993
19994
  aiResourceMode: void 0,
19994
19995
  enableAIAgentChange: true,
19995
19996
  globalDownloadPrifix: false,
@@ -20075,6 +20076,25 @@ var GlobalConfig = class {
20075
20076
  quality: 0,
20076
20077
  maxWidth: 1280
20077
20078
  };
20079
+ /**
20080
+ * @description 静态图片资源
20081
+ * @type {IGlobalImgAssets}
20082
+ * @memberof GlobalConfig
20083
+ */
20084
+ this.imageAssets = {
20085
+ noPermission: "".concat(ibiz.env.assetsUrl, "/images/403.png"),
20086
+ noFind: "".concat(ibiz.env.assetsUrl, "/images/404.png"),
20087
+ loginAvatar: "".concat(ibiz.env.assetsUrl, "/images/login-avatar.png"),
20088
+ loginHeader: "".concat(ibiz.env.assetsUrl, "/images/login-header.png"),
20089
+ poiMarker: "".concat(ibiz.env.assetsUrl, "/images/poi-marker-default.png"),
20090
+ userAvatar: "".concat(ibiz.env.assetsUrl, "/images/user-avatar.png"),
20091
+ chat: "".concat(ibiz.env.assetsUrl, "/images/svg/chat.svg"),
20092
+ customWorkbench: "".concat(ibiz.env.assetsUrl, "/images/svg/custom-workbench.svg"),
20093
+ helper: "".concat(ibiz.env.assetsUrl, "/images/svg/helper.svg"),
20094
+ iconImport: "".concat(ibiz.env.assetsUrl, "/images/svg/icon-import.svg"),
20095
+ message: "".concat(ibiz.env.assetsUrl, "/images/svg/message.svg"),
20096
+ setting: "".concat(ibiz.env.assetsUrl, "/images/svg/setting.svg")
20097
+ };
20078
20098
  }
20079
20099
  };
20080
20100
 
@@ -24128,6 +24148,10 @@ var CustomRegister = class {
24128
24148
  * @memberof CustomRegister
24129
24149
  */
24130
24150
  static getRegisterKey(registerType, opts) {
24151
+ const { mainModel } = opts;
24152
+ if (mainModel && mainModel.customExtTag) {
24153
+ return mainModel.customExtTag;
24154
+ }
24131
24155
  switch (registerType) {
24132
24156
  case VIEW_PROVIDER_PREFIX:
24133
24157
  return this.calcExtensionViewKey(opts);
@@ -73768,7 +73792,7 @@ var ThemeUtil = class {
73768
73792
  /**
73769
73793
  * @description 加载主题插件
73770
73794
  * @param {IAppUITheme} theme
73771
- * @param {('COLOR' | 'ICON')} [type='COLOR'] 颜色主题|图标主题,默认值为颜色主题
73795
+ * @param {('COLOR' | 'ICON')} [type='COLOR'] 颜色主题|图标主题,默认值为颜色主题,颜色主题包含远程插件和主题变量共存的情况,主题变量的优先级大于远程插件的优先级
73772
73796
  * @returns {*} {Promise<void>}
73773
73797
  * @memberof ThemeUtil
73774
73798
  */
@@ -73777,19 +73801,43 @@ var ThemeUtil = class {
73777
73801
  const path2 = data["theme-package-path"] || theme.themeUrl;
73778
73802
  delete data.appId;
73779
73803
  delete data["theme-package-path"];
73780
- await ibiz.plugin.loadPlugin({
73781
- runtimeObject: true,
73782
- rtobjectName: theme.themeTag,
73783
- rtobjectRepo: path2
73784
- });
73804
+ if (path2) {
73805
+ await ibiz.plugin.loadPlugin({
73806
+ runtimeObject: true,
73807
+ rtobjectName: theme.themeTag,
73808
+ rtobjectRepo: path2
73809
+ });
73810
+ }
73785
73811
  if (type === "COLOR") {
73786
73812
  this.setThemeParams(theme, data);
73813
+ if (theme.cssStyle) {
73814
+ this.setThemeCssStyle(theme);
73815
+ }
73787
73816
  this.setTheme(theme.themeTag);
73788
73817
  this.pluginTheme.push(theme);
73789
73818
  } else {
73790
73819
  this.html.classList.add(theme.themeTag);
73791
73820
  }
73792
73821
  }
73822
+ /**
73823
+ * @description 设置主题变量
73824
+ * @protected
73825
+ * @param {IAppUITheme} theme
73826
+ * @returns {*} {void}
73827
+ * @memberof ThemeUtil
73828
+ */
73829
+ setThemeCssStyle(theme) {
73830
+ const styleId = "".concat(theme.themeTag, "-var-css");
73831
+ const themeStyle = document.getElementById(styleId);
73832
+ if (themeStyle) {
73833
+ return;
73834
+ }
73835
+ const style = document.createElement("style");
73836
+ style.id = styleId;
73837
+ style.type = "text/css";
73838
+ style.innerHTML = theme.cssStyle;
73839
+ document.head.appendChild(style);
73840
+ }
73793
73841
  /**
73794
73842
  * @description 设置额外修改的主题参数
73795
73843
  * @protected
@@ -73811,11 +73859,11 @@ var ThemeUtil = class {
73811
73859
  }
73812
73860
  }
73813
73861
  content += "}";
73814
- const script = document.createElement("style");
73815
- script.id = theme.themeTag;
73816
- script.type = "text/css";
73817
- script.innerHTML = content;
73818
- document.head.appendChild(script);
73862
+ const style = document.createElement("style");
73863
+ style.id = theme.themeTag;
73864
+ style.type = "text/css";
73865
+ style.innerHTML = content;
73866
+ document.head.appendChild(style);
73819
73867
  }
73820
73868
  /**
73821
73869
  * @description 设置主题