@ibiz-template/vue3-components 0.7.41-alpha.121 → 0.7.41-alpha.123

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 (52) hide show
  1. package/dist/{index-YGY0RKUR.js → index-BoohvOk8.js} +13 -13
  2. package/dist/{index.es-AEZP6Fvy.js → index.es-DRy77DO2.js} +1 -1
  3. package/dist/index.min.css +1 -1
  4. package/dist/index.system.min.js +1 -1
  5. package/dist/{wang-editor-zpJYuJGU.js → wang-editor-B_LobLwM.js} +1 -1
  6. package/dist/{xlsx-util-Crzb5rtS.js → xlsx-util-Zj1X0MzV.js} +1 -1
  7. package/es/common/data-import/data-import.mjs +1 -1
  8. package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +3 -2
  9. package/es/editor/map-picker/map-picker-editor.controller.mjs +1 -1
  10. package/es/editor/text-box/input/input.mjs +1 -1
  11. package/es/panel-component/auth-userinfo/auth-userinfo.mjs +1 -1
  12. package/es/panel-component/user-action/user-action.mjs +3 -3
  13. package/es/panel-component/user-message/user-message.mjs +1 -1
  14. package/es/util/ai-chat-util/ai-chat-util.mjs +11 -0
  15. package/es/view/403-view/403-view.mjs +1 -1
  16. package/es/view/404-view/404-view.mjs +1 -1
  17. package/es/view/login-view/login-view.mjs +2 -3
  18. package/es/view/share-view/share-view.mjs +1 -1
  19. package/es/view/unauthorized-view/unauthorized-view.mjs +1 -1
  20. package/es/web-app/guard/auth-guard/auth-guard.mjs +3 -1
  21. package/es/web-app/guard/auth-guard/dyna-auth-guard.mjs +7 -1
  22. package/lib/common/data-import/data-import.cjs +1 -1
  23. package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +3 -2
  24. package/lib/editor/map-picker/map-picker-editor.controller.cjs +1 -1
  25. package/lib/editor/text-box/input/input.cjs +1 -1
  26. package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +1 -1
  27. package/lib/panel-component/user-action/user-action.cjs +3 -3
  28. package/lib/panel-component/user-message/user-message.cjs +1 -1
  29. package/lib/util/ai-chat-util/ai-chat-util.cjs +11 -0
  30. package/lib/view/403-view/403-view.cjs +1 -1
  31. package/lib/view/404-view/404-view.cjs +1 -1
  32. package/lib/view/login-view/login-view.cjs +2 -3
  33. package/lib/view/share-view/share-view.cjs +1 -1
  34. package/lib/view/unauthorized-view/unauthorized-view.cjs +1 -1
  35. package/lib/web-app/guard/auth-guard/auth-guard.cjs +3 -1
  36. package/lib/web-app/guard/auth-guard/dyna-auth-guard.cjs +7 -1
  37. package/package.json +5 -5
  38. package/src/common/data-import/data-import.tsx +1 -1
  39. package/src/editor/ai-chat/embed-ai-chat/embed-ai-chat.tsx +7 -2
  40. package/src/editor/map-picker/map-picker-editor.controller.ts +1 -1
  41. package/src/editor/text-box/input/input.tsx +1 -1
  42. package/src/panel-component/auth-userinfo/auth-userinfo.tsx +1 -1
  43. package/src/panel-component/user-action/user-action.tsx +3 -3
  44. package/src/panel-component/user-message/user-message.tsx +1 -1
  45. package/src/util/ai-chat-util/ai-chat-util.ts +17 -0
  46. package/src/view/403-view/403-view.tsx +1 -1
  47. package/src/view/404-view/404-view.tsx +1 -4
  48. package/src/view/login-view/login-view.tsx +3 -3
  49. package/src/view/share-view/share-view.tsx +1 -1
  50. package/src/view/unauthorized-view/unauthorized-view.tsx +1 -4
  51. package/src/web-app/guard/auth-guard/auth-guard.ts +3 -4
  52. package/src/web-app/guard/auth-guard/dyna-auth-guard.ts +18 -1
@@ -134,7 +134,7 @@ const DataImport = /* @__PURE__ */ defineComponent({
134
134
  "onClick": this.selectFile
135
135
  }, [createVNode("img", {
136
136
  "class": this.ns.be("upload", "img"),
137
- "src": "./assets/images/icon-import.svg"
137
+ "src": ibiz.config.imageAssets.iconImport
138
138
  }, null), createVNode("span", {
139
139
  "class": this.ns.be("upload", "text")
140
140
  }, [ibiz.i18n.t("component.dataImport.clickToUpload")])]) : createVNode("div", {
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, createVNode, ref, watch, onMounted, onUnmounted } from 'vue';
2
+ import { createUUID } from 'qx-util';
2
3
  import { convertNavData, calcDeCodeNameById, FormDetailEventName } from '@ibiz-template/runtime';
3
4
  import { useNamespace, getEditorEmits, getInputProps } from '@ibiz-template/vue3-util';
4
5
  import './embed-ai-chat.css';
@@ -45,7 +46,7 @@ const IBizEmbedAIChat = /* @__PURE__ */ defineComponent({
45
46
  } else {
46
47
  const appDataEntityName = calcDeCodeNameById(appDataEntityId);
47
48
  topicId = "".concat(appDataEntityId, "@").concat(c.model.appDEACModeId, "@");
48
- topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : "default";
49
+ topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : editorParams.srfainewtopic === "true" ? createUUID() : "default";
49
50
  if (editorParams.srfattachsessiontag) {
50
51
  topicId += "__".concat(editorParams.srfattachsessiontag);
51
52
  delete editorParams.srfattachsessiontag;
@@ -76,7 +77,7 @@ const IBizEmbedAIChat = /* @__PURE__ */ defineComponent({
76
77
  chatCaption = ibiz.appUtil.resolveI18nText(editorParams.srfaichatcaption);
77
78
  }
78
79
  const chatInstanceOptions = {
79
- mode: "TOPIC",
80
+ mode: editorParams.srfaimode || "TOPIC",
80
81
  placeholder: c.placeHolder,
81
82
  resourceOptions,
82
83
  containerOptions: {
@@ -22,7 +22,7 @@ class MapPickerEditorController extends EditorController {
22
22
  * @type {string}
23
23
  * @memberof MapPickerEditorController
24
24
  */
25
- __publicField(this, "markerIcon", "".concat(ibiz.env.assetsUrl, "/images/poi-marker-default.png"));
25
+ __publicField(this, "markerIcon", ibiz.config.imageAssets.poiMarker);
26
26
  /**
27
27
  * @description 默认中心点坐标
28
28
  * @memberof MapPickerEditorController
@@ -408,7 +408,7 @@ const IBizInput = /* @__PURE__ */ defineComponent({
408
408
  "title": ibiz.i18n.t("editor.textBox.openAiChat"),
409
409
  "onClick": this.onClick
410
410
  }, [createVNode("ion-icon", {
411
- "src": "./assets/images/svg/chat.svg"
411
+ "src": ibiz.config.imageAssets.chat
412
412
  }, null)]) : null]);
413
413
  }
414
414
  });
@@ -90,7 +90,7 @@ const AuthUserinfo = /* @__PURE__ */ defineComponent({
90
90
  }, [createVNode(resolveComponent("el-avatar"), {
91
91
  "class": [this.ns.b("avatar"), this.semanticClass("avatar")],
92
92
  "style": this.semanticStyle("avatar"),
93
- "src": "./assets/images/user-avatar.png"
93
+ "src": ibiz.config.imageAssets.userAvatar
94
94
  }, null), createVNode("div", {
95
95
  "class": [this.ns.b("name"), this.ns.is("collapse", this.isCollapse), this.semanticClass("name")],
96
96
  "style": this.semanticStyle("name")
@@ -33,13 +33,13 @@ const UserAction = /* @__PURE__ */ defineComponent({
33
33
  } = useSemanticNode(props.controller);
34
34
  const imgConfig = {
35
35
  SETTING: {
36
- imagePath: "svg/setting.svg"
36
+ imagePath: ibiz.config.imageAssets.setting
37
37
  },
38
38
  HELPER: {
39
- imagePath: "svg/helper.svg"
39
+ imagePath: ibiz.config.imageAssets.helper
40
40
  },
41
41
  CUSTOM: {
42
- imagePath: "svg/custom-workbench.svg"
42
+ imagePath: ibiz.config.imageAssets.customWorkbench
43
43
  }
44
44
  };
45
45
  let sysImage = props.modelData.sysImage;
@@ -43,7 +43,7 @@ const UserMessage = /* @__PURE__ */ defineComponent({
43
43
  noticeController.internalMessage.provider = new InternalMessageDefaultProvider();
44
44
  const currentTab = ref("notification");
45
45
  const sysImage = props.modelData.sysImage || {
46
- imagePath: "svg/message.svg"
46
+ imagePath: ibiz.config.imageAssets.message
47
47
  };
48
48
  const popoverRef = ref();
49
49
  const hiddenPopover = () => {
@@ -180,6 +180,11 @@ class AIChatUtil {
180
180
  } else {
181
181
  chatOptions.chunkEntity = ibiz.config.common.aiChunkEntity;
182
182
  }
183
+ if (editorParams.topiccaptioncomputedmode) {
184
+ chatOptions.captionComputedMode = editorParams.topiccaptioncomputedmode;
185
+ } else {
186
+ chatOptions.captionComputedMode = ibiz.config.common.aiChatTopicCaptionComputedMode;
187
+ }
183
188
  chatOptions.fetchAgentList = (query) => {
184
189
  return this.getAIAgentList(context, { ...params, query }, editorParams);
185
190
  };
@@ -767,6 +772,12 @@ class AIChatUtil {
767
772
  } else {
768
773
  chatOptions.chunkEntity = ibiz.config.common.aiChunkEntity;
769
774
  }
775
+ if (params.hasOwnProperty("topiccaptioncomputedmode")) {
776
+ chatOptions.captionComputedMode = params.topiccaptioncomputedmode;
777
+ delete params.topiccaptioncomputedmode;
778
+ } else {
779
+ chatOptions.captionComputedMode = ibiz.config.common.aiChatTopicCaptionComputedMode;
780
+ }
770
781
  chatOptions.fetchAgentList = (query) => {
771
782
  return this.getAIAgentList(context, { ...params, query });
772
783
  };
@@ -29,7 +29,7 @@ const View403 = /* @__PURE__ */ defineComponent({
29
29
  "class": [this.ns.b(), this.ns.is("top", this.isTop)]
30
30
  }, [createVNode("img", {
31
31
  "class": this.ns.b("img"),
32
- "src": "".concat(ibiz.env.assetsUrl, "/images/403.png")
32
+ "src": ibiz.config.imageAssets.noPermission
33
33
  }, null), createVNode("div", {
34
34
  "class": this.ns.b("text")
35
35
  }, [createVNode("div", {
@@ -29,7 +29,7 @@ const View404 = /* @__PURE__ */ defineComponent({
29
29
  "class": [this.ns.b(), this.ns.is("top", this.isTop)]
30
30
  }, [createVNode("img", {
31
31
  "class": this.ns.b("img"),
32
- "src": "".concat(ibiz.env.assetsUrl, "/images/404.png")
32
+ "src": ibiz.config.imageAssets.noFind
33
33
  }, null), createVNode("div", {
34
34
  "class": this.ns.b("text")
35
35
  }, [createVNode("div", {
@@ -114,7 +114,6 @@ const LoginView = /* @__PURE__ */ defineComponent({
114
114
  const loginViewConfig = await ibiz.hub.config.view.get("AppLoginView");
115
115
  if (loginViewConfig) {
116
116
  loginView.value = loginViewConfig;
117
- hasLoginView.value = true;
118
117
  }
119
118
  } catch (err) {
120
119
  ibiz.log.warn(err);
@@ -141,14 +140,14 @@ const LoginView = /* @__PURE__ */ defineComponent({
141
140
  }, [createVNode("header", {
142
141
  "class": ns.b("box-header")
143
142
  }, [createVNode("img", {
144
- "src": "./assets/images/login-header.png"
143
+ "src": ibiz.config.imageAssets.loginHeader
145
144
  }, null), createVNode("span", {
146
145
  "class": ns.b("box-header-title")
147
146
  }, [appTitle])]), createVNode("main", {
148
147
  "class": ns.b("box-main")
149
148
  }, [createVNode("img", {
150
149
  "class": ns.be("box-main", "avatar"),
151
- "src": "./assets/images/login-avatar.png"
150
+ "src": ibiz.config.imageAssets.loginAvatar
152
151
  }, null), createVNode("div", {
153
152
  "class": ns.b("box-main-content")
154
153
  }, [createVNode(resolveComponent("el-form"), {
@@ -62,7 +62,7 @@ const ShareView = /* @__PURE__ */ defineComponent({
62
62
  }, [createVNode("header", {
63
63
  "class": this.ns.b("box-header")
64
64
  }, [createVNode("img", {
65
- "src": "./assets/images/login-header.png"
65
+ "src": ibiz.config.imageAssets.loginHeader
66
66
  }, null), createVNode("div", {
67
67
  "class": this.ns.b("box-header-title")
68
68
  }, [createVNode("div", null, [this.shareUser.userName]), ibiz.i18n.t("view.shareView.inviting")])]), createVNode("main", {
@@ -41,7 +41,7 @@ const UnauthorizedView = /* @__PURE__ */ defineComponent({
41
41
  "class": ns.b()
42
42
  }, [createVNode("img", {
43
43
  "class": ns.e("img"),
44
- "src": "".concat(ibiz.env.assetsUrl, "/images/404.png")
44
+ "src": ibiz.config.imageAssets.noFind
45
45
  }, null), createVNode("div", {
46
46
  "class": ns.e("tips")
47
47
  }, [ibiz.i18n.t("view.noResourcesView.noResourcePrompt"), createVNode("br", null, null), ibiz.i18n.t("view.noResourcesView.noExistPrompt", {
@@ -268,7 +268,9 @@ class AuthGuard {
268
268
  const uiThemes = app.model.appUIThemes || [];
269
269
  if (uiThemes.length > 0) {
270
270
  const colorThemes = uiThemes.filter((uiTheme) => {
271
- return uiTheme.themeParams && uiTheme.themeParams["icon-theme"] !== "true";
271
+ var _a;
272
+ const isIconTheme = ((_a = uiTheme.themeParams) == null ? void 0 : _a["icon-theme"]) === "true";
273
+ return !isIconTheme && Boolean(uiTheme.cssStyle || uiTheme.themeParams);
272
274
  });
273
275
  if (colorThemes.length > 0) {
274
276
  for (let index = 0; index < colorThemes.length; index++) {
@@ -9,6 +9,7 @@ var __publicField = (obj, key, value) => {
9
9
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
10
10
  return value;
11
11
  };
12
+ const PREDEFINED_THEMES = ["light", "dark", "blue"];
12
13
  class DynaAuthGuard extends AuthGuard {
13
14
  constructor() {
14
15
  super(...arguments);
@@ -41,10 +42,15 @@ class DynaAuthGuard extends AuthGuard {
41
42
  const module = await import('@ibiz-template/web-theme');
42
43
  const theme = module.default || module;
43
44
  AppHooks.useComponent.callSync(null, theme);
44
- if (ibiz.config.theme)
45
+ if (ibiz.config.theme && PREDEFINED_THEMES.includes(ibiz.config.theme)) {
45
46
  ibiz.util.theme.setTheme(ibiz.config.theme);
47
+ }
46
48
  if (appModel.appUIThemes) {
47
49
  await this.loadTheme();
50
+ const themeTags = appModel.appUIThemes.map((uiTheme) => uiTheme.themeTag).filter((tag) => !!tag);
51
+ if (ibiz.config.theme && (PREDEFINED_THEMES.includes(ibiz.config.theme) || themeTags.includes(ibiz.config.theme))) {
52
+ ibiz.util.theme.setTheme(ibiz.config.theme);
53
+ }
48
54
  }
49
55
  if (app.model.title) {
50
56
  ibiz.util.setBrowserTitle("");
@@ -136,7 +136,7 @@ const DataImport = /* @__PURE__ */ vue.defineComponent({
136
136
  "onClick": this.selectFile
137
137
  }, [vue.createVNode("img", {
138
138
  "class": this.ns.be("upload", "img"),
139
- "src": "./assets/images/icon-import.svg"
139
+ "src": ibiz.config.imageAssets.iconImport
140
140
  }, null), vue.createVNode("span", {
141
141
  "class": this.ns.be("upload", "text")
142
142
  }, [ibiz.i18n.t("component.dataImport.clickToUpload")])]) : vue.createVNode("div", {
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var vue = require('vue');
4
+ var qxUtil = require('qx-util');
4
5
  var runtime = require('@ibiz-template/runtime');
5
6
  var vue3Util = require('@ibiz-template/vue3-util');
6
7
  require('./embed-ai-chat.css');
@@ -47,7 +48,7 @@ const IBizEmbedAIChat = /* @__PURE__ */ vue.defineComponent({
47
48
  } else {
48
49
  const appDataEntityName = runtime.calcDeCodeNameById(appDataEntityId);
49
50
  topicId = "".concat(appDataEntityId, "@").concat(c.model.appDEACModeId, "@");
50
- topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : "default";
51
+ topicId += c.context[appDataEntityName] ? c.context[appDataEntityName] : editorParams.srfainewtopic === "true" ? qxUtil.createUUID() : "default";
51
52
  if (editorParams.srfattachsessiontag) {
52
53
  topicId += "__".concat(editorParams.srfattachsessiontag);
53
54
  delete editorParams.srfattachsessiontag;
@@ -78,7 +79,7 @@ const IBizEmbedAIChat = /* @__PURE__ */ vue.defineComponent({
78
79
  chatCaption = ibiz.appUtil.resolveI18nText(editorParams.srfaichatcaption);
79
80
  }
80
81
  const chatInstanceOptions = {
81
- mode: "TOPIC",
82
+ mode: editorParams.srfaimode || "TOPIC",
82
83
  placeholder: c.placeHolder,
83
84
  resourceOptions,
84
85
  containerOptions: {
@@ -24,7 +24,7 @@ class MapPickerEditorController extends runtime.EditorController {
24
24
  * @type {string}
25
25
  * @memberof MapPickerEditorController
26
26
  */
27
- __publicField(this, "markerIcon", "".concat(ibiz.env.assetsUrl, "/images/poi-marker-default.png"));
27
+ __publicField(this, "markerIcon", ibiz.config.imageAssets.poiMarker);
28
28
  /**
29
29
  * @description 默认中心点坐标
30
30
  * @memberof MapPickerEditorController
@@ -410,7 +410,7 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
410
410
  "title": ibiz.i18n.t("editor.textBox.openAiChat"),
411
411
  "onClick": this.onClick
412
412
  }, [vue.createVNode("ion-icon", {
413
- "src": "./assets/images/svg/chat.svg"
413
+ "src": ibiz.config.imageAssets.chat
414
414
  }, null)]) : null]);
415
415
  }
416
416
  });
@@ -92,7 +92,7 @@ const AuthUserinfo = /* @__PURE__ */ vue.defineComponent({
92
92
  }, [vue.createVNode(vue.resolveComponent("el-avatar"), {
93
93
  "class": [this.ns.b("avatar"), this.semanticClass("avatar")],
94
94
  "style": this.semanticStyle("avatar"),
95
- "src": "./assets/images/user-avatar.png"
95
+ "src": ibiz.config.imageAssets.userAvatar
96
96
  }, null), vue.createVNode("div", {
97
97
  "class": [this.ns.b("name"), this.ns.is("collapse", this.isCollapse), this.semanticClass("name")],
98
98
  "style": this.semanticStyle("name")
@@ -35,13 +35,13 @@ const UserAction = /* @__PURE__ */ vue.defineComponent({
35
35
  } = vue3Util.useSemanticNode(props.controller);
36
36
  const imgConfig = {
37
37
  SETTING: {
38
- imagePath: "svg/setting.svg"
38
+ imagePath: ibiz.config.imageAssets.setting
39
39
  },
40
40
  HELPER: {
41
- imagePath: "svg/helper.svg"
41
+ imagePath: ibiz.config.imageAssets.helper
42
42
  },
43
43
  CUSTOM: {
44
- imagePath: "svg/custom-workbench.svg"
44
+ imagePath: ibiz.config.imageAssets.customWorkbench
45
45
  }
46
46
  };
47
47
  let sysImage = props.modelData.sysImage;
@@ -45,7 +45,7 @@ const UserMessage = /* @__PURE__ */ vue.defineComponent({
45
45
  noticeController.internalMessage.provider = new internalMessageDefault_provider.InternalMessageDefaultProvider();
46
46
  const currentTab = vue.ref("notification");
47
47
  const sysImage = props.modelData.sysImage || {
48
- imagePath: "svg/message.svg"
48
+ imagePath: ibiz.config.imageAssets.message
49
49
  };
50
50
  const popoverRef = vue.ref();
51
51
  const hiddenPopover = () => {
@@ -182,6 +182,11 @@ class AIChatUtil {
182
182
  } else {
183
183
  chatOptions.chunkEntity = ibiz.config.common.aiChunkEntity;
184
184
  }
185
+ if (editorParams.topiccaptioncomputedmode) {
186
+ chatOptions.captionComputedMode = editorParams.topiccaptioncomputedmode;
187
+ } else {
188
+ chatOptions.captionComputedMode = ibiz.config.common.aiChatTopicCaptionComputedMode;
189
+ }
185
190
  chatOptions.fetchAgentList = (query) => {
186
191
  return this.getAIAgentList(context, { ...params, query }, editorParams);
187
192
  };
@@ -769,6 +774,12 @@ class AIChatUtil {
769
774
  } else {
770
775
  chatOptions.chunkEntity = ibiz.config.common.aiChunkEntity;
771
776
  }
777
+ if (params.hasOwnProperty("topiccaptioncomputedmode")) {
778
+ chatOptions.captionComputedMode = params.topiccaptioncomputedmode;
779
+ delete params.topiccaptioncomputedmode;
780
+ } else {
781
+ chatOptions.captionComputedMode = ibiz.config.common.aiChatTopicCaptionComputedMode;
782
+ }
772
783
  chatOptions.fetchAgentList = (query) => {
773
784
  return this.getAIAgentList(context, { ...params, query });
774
785
  };
@@ -31,7 +31,7 @@ const View403 = /* @__PURE__ */ vue.defineComponent({
31
31
  "class": [this.ns.b(), this.ns.is("top", this.isTop)]
32
32
  }, [vue.createVNode("img", {
33
33
  "class": this.ns.b("img"),
34
- "src": "".concat(ibiz.env.assetsUrl, "/images/403.png")
34
+ "src": ibiz.config.imageAssets.noPermission
35
35
  }, null), vue.createVNode("div", {
36
36
  "class": this.ns.b("text")
37
37
  }, [vue.createVNode("div", {
@@ -31,7 +31,7 @@ const View404 = /* @__PURE__ */ vue.defineComponent({
31
31
  "class": [this.ns.b(), this.ns.is("top", this.isTop)]
32
32
  }, [vue.createVNode("img", {
33
33
  "class": this.ns.b("img"),
34
- "src": "".concat(ibiz.env.assetsUrl, "/images/404.png")
34
+ "src": ibiz.config.imageAssets.noFind
35
35
  }, null), vue.createVNode("div", {
36
36
  "class": this.ns.b("text")
37
37
  }, [vue.createVNode("div", {
@@ -116,7 +116,6 @@ const LoginView = /* @__PURE__ */ vue.defineComponent({
116
116
  const loginViewConfig = await ibiz.hub.config.view.get("AppLoginView");
117
117
  if (loginViewConfig) {
118
118
  loginView.value = loginViewConfig;
119
- hasLoginView.value = true;
120
119
  }
121
120
  } catch (err) {
122
121
  ibiz.log.warn(err);
@@ -143,14 +142,14 @@ const LoginView = /* @__PURE__ */ vue.defineComponent({
143
142
  }, [vue.createVNode("header", {
144
143
  "class": ns.b("box-header")
145
144
  }, [vue.createVNode("img", {
146
- "src": "./assets/images/login-header.png"
145
+ "src": ibiz.config.imageAssets.loginHeader
147
146
  }, null), vue.createVNode("span", {
148
147
  "class": ns.b("box-header-title")
149
148
  }, [appTitle])]), vue.createVNode("main", {
150
149
  "class": ns.b("box-main")
151
150
  }, [vue.createVNode("img", {
152
151
  "class": ns.be("box-main", "avatar"),
153
- "src": "./assets/images/login-avatar.png"
152
+ "src": ibiz.config.imageAssets.loginAvatar
154
153
  }, null), vue.createVNode("div", {
155
154
  "class": ns.b("box-main-content")
156
155
  }, [vue.createVNode(vue.resolveComponent("el-form"), {
@@ -64,7 +64,7 @@ const ShareView = /* @__PURE__ */ vue.defineComponent({
64
64
  }, [vue.createVNode("header", {
65
65
  "class": this.ns.b("box-header")
66
66
  }, [vue.createVNode("img", {
67
- "src": "./assets/images/login-header.png"
67
+ "src": ibiz.config.imageAssets.loginHeader
68
68
  }, null), vue.createVNode("div", {
69
69
  "class": this.ns.b("box-header-title")
70
70
  }, [vue.createVNode("div", null, [this.shareUser.userName]), ibiz.i18n.t("view.shareView.inviting")])]), vue.createVNode("main", {
@@ -43,7 +43,7 @@ const UnauthorizedView = /* @__PURE__ */ vue.defineComponent({
43
43
  "class": ns.b()
44
44
  }, [vue.createVNode("img", {
45
45
  "class": ns.e("img"),
46
- "src": "".concat(ibiz.env.assetsUrl, "/images/404.png")
46
+ "src": ibiz.config.imageAssets.noFind
47
47
  }, null), vue.createVNode("div", {
48
48
  "class": ns.e("tips")
49
49
  }, [ibiz.i18n.t("view.noResourcesView.noResourcePrompt"), vue.createVNode("br", null, null), ibiz.i18n.t("view.noResourcesView.noExistPrompt", {
@@ -270,7 +270,9 @@ class AuthGuard {
270
270
  const uiThemes = app.model.appUIThemes || [];
271
271
  if (uiThemes.length > 0) {
272
272
  const colorThemes = uiThemes.filter((uiTheme) => {
273
- return uiTheme.themeParams && uiTheme.themeParams["icon-theme"] !== "true";
273
+ var _a;
274
+ const isIconTheme = ((_a = uiTheme.themeParams) == null ? void 0 : _a["icon-theme"]) === "true";
275
+ return !isIconTheme && Boolean(uiTheme.cssStyle || uiTheme.themeParams);
274
276
  });
275
277
  if (colorThemes.length > 0) {
276
278
  for (let index = 0; index < colorThemes.length; index++) {
@@ -11,6 +11,7 @@ var __publicField = (obj, key, value) => {
11
11
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
12
12
  return value;
13
13
  };
14
+ const PREDEFINED_THEMES = ["light", "dark", "blue"];
14
15
  class DynaAuthGuard extends authGuard.AuthGuard {
15
16
  constructor() {
16
17
  super(...arguments);
@@ -43,10 +44,15 @@ class DynaAuthGuard extends authGuard.AuthGuard {
43
44
  const module = await import('@ibiz-template/web-theme');
44
45
  const theme = module.default || module;
45
46
  vue3Util.AppHooks.useComponent.callSync(null, theme);
46
- if (ibiz.config.theme)
47
+ if (ibiz.config.theme && PREDEFINED_THEMES.includes(ibiz.config.theme)) {
47
48
  ibiz.util.theme.setTheme(ibiz.config.theme);
49
+ }
48
50
  if (appModel.appUIThemes) {
49
51
  await this.loadTheme();
52
+ const themeTags = appModel.appUIThemes.map((uiTheme) => uiTheme.themeTag).filter((tag) => !!tag);
53
+ if (ibiz.config.theme && (PREDEFINED_THEMES.includes(ibiz.config.theme) || themeTags.includes(ibiz.config.theme))) {
54
+ ibiz.util.theme.setTheme(ibiz.config.theme);
55
+ }
50
56
  }
51
57
  if (app.model.title) {
52
58
  ibiz.util.setBrowserTitle("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.41-alpha.121",
3
+ "version": "0.7.41-alpha.123",
4
4
  "description": "web端组件库(vue3)",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -31,16 +31,16 @@
31
31
  "dependencies": {
32
32
  "@amap/amap-jsapi-loader": "^1.0.1",
33
33
  "@floating-ui/dom": "^1.5.3",
34
- "@ibiz-template-plugin/ai-chat": "^0.0.93",
34
+ "@ibiz-template-plugin/ai-chat": "^0.0.95",
35
35
  "@ibiz-template-plugin/gantt": "0.1.8-alpha.468",
36
36
  "@ibiz-template-plugin/bi-report": "0.0.32",
37
37
  "@ibiz-template-plugin/data-view": "0.0.8",
38
38
  "@ibiz-template/core": "0.7.41-alpha.119",
39
39
  "@ibiz-template/devtool": "0.0.16",
40
- "@ibiz-template/model-helper": "0.7.41-alpha.127",
41
- "@ibiz-template/runtime": "0.7.41-alpha.127",
40
+ "@ibiz-template/model-helper": "0.7.41-alpha.129",
41
+ "@ibiz-template/runtime": "0.7.41-alpha.128",
42
42
  "@ibiz-template/theme": "0.7.39",
43
- "@ibiz-template/vue3-util": "0.7.41-alpha.127",
43
+ "@ibiz-template/vue3-util": "0.7.41-alpha.128",
44
44
  "@ibiz-template/web-theme": "3.16.0",
45
45
  "@ibiz/model-core": "^0.1.89",
46
46
  "@imengyu/vue3-context-menu": "^1.3.5",
@@ -171,7 +171,7 @@ export const DataImport = defineComponent({
171
171
  <div class={this.ns.b('upload')} onClick={this.selectFile}>
172
172
  <img
173
173
  class={this.ns.be('upload', 'img')}
174
- src='./assets/images/icon-import.svg'
174
+ src={ibiz.config.imageAssets.iconImport}
175
175
  ></img>
176
176
  <span class={this.ns.be('upload', 'text')}>
177
177
  {ibiz.i18n.t('component.dataImport.clickToUpload')}
@@ -1,5 +1,7 @@
1
+ /* eslint-disable no-nested-ternary */
1
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
3
  import { defineComponent, onMounted, onUnmounted, Ref, ref, watch } from 'vue';
4
+ import { createUUID } from 'qx-util';
3
5
  import { ITextArea } from '@ibiz/model-core';
4
6
  import {
5
7
  convertNavData,
@@ -62,9 +64,12 @@ export const IBizEmbedAIChat = defineComponent({
62
64
  } else {
63
65
  const appDataEntityName = calcDeCodeNameById(appDataEntityId!);
64
66
  topicId = `${appDataEntityId}@${(c.model as ITextArea).appDEACModeId}@`;
67
+ // srfainewtopic 打开即新建会话,不去寻找历史会话
65
68
  topicId += c.context[appDataEntityName]
66
69
  ? c.context[appDataEntityName]
67
- : 'default';
70
+ : editorParams.srfainewtopic === 'true'
71
+ ? createUUID()
72
+ : 'default';
68
73
  // 附加会话标记附加至数据主键段,主要解决同一数据多个智能体会话历史数据混乱问题
69
74
  if (editorParams.srfattachsessiontag) {
70
75
  topicId += `__${editorParams.srfattachsessiontag}`;
@@ -106,7 +111,7 @@ export const IBizEmbedAIChat = defineComponent({
106
111
  );
107
112
  }
108
113
  const chatInstanceOptions: IData = {
109
- mode: 'TOPIC',
114
+ mode: editorParams.srfaimode || 'TOPIC',
110
115
  placeholder: c.placeHolder,
111
116
  resourceOptions,
112
117
  containerOptions: {
@@ -23,7 +23,7 @@ export class MapPickerEditorController extends EditorController<IMapPicker> {
23
23
  * @type {string}
24
24
  * @memberof MapPickerEditorController
25
25
  */
26
- public markerIcon: string = `${ibiz.env.assetsUrl}/images/poi-marker-default.png`;
26
+ public markerIcon: string = ibiz.config.imageAssets.poiMarker;
27
27
 
28
28
  /**
29
29
  * @description 默认中心点坐标
@@ -573,7 +573,7 @@ export const IBizInput = defineComponent({
573
573
  title={ibiz.i18n.t('editor.textBox.openAiChat')}
574
574
  onClick={this.onClick}
575
575
  >
576
- <ion-icon src='./assets/images/svg/chat.svg' />
576
+ <ion-icon src={ibiz.config.imageAssets.chat} />
577
577
  </div>
578
578
  ) : null}
579
579
  </div>
@@ -112,7 +112,7 @@ export const AuthUserinfo = defineComponent({
112
112
  <el-avatar
113
113
  class={[this.ns.b('avatar'), this.semanticClass('avatar')]}
114
114
  style={this.semanticStyle('avatar')}
115
- src='./assets/images/user-avatar.png'
115
+ src={ibiz.config.imageAssets.userAvatar}
116
116
  />
117
117
 
118
118
  <div
@@ -42,9 +42,9 @@ export const UserAction = defineComponent({
42
42
 
43
43
  // 图片配置
44
44
  const imgConfig: IData = {
45
- SETTING: { imagePath: 'svg/setting.svg' },
46
- HELPER: { imagePath: 'svg/helper.svg' },
47
- CUSTOM: { imagePath: 'svg/custom-workbench.svg' },
45
+ SETTING: { imagePath: ibiz.config.imageAssets.setting },
46
+ HELPER: { imagePath: ibiz.config.imageAssets.helper },
47
+ CUSTOM: { imagePath: ibiz.config.imageAssets.customWorkbench },
48
48
  };
49
49
 
50
50
  let sysImage = props.modelData.sysImage;
@@ -50,7 +50,7 @@ export const UserMessage = defineComponent({
50
50
  const currentTab = ref<string>('notification');
51
51
  // 图片有配置拿配置,没配置取默认图片
52
52
  const sysImage = props.modelData.sysImage || {
53
- imagePath: 'svg/message.svg',
53
+ imagePath: ibiz.config.imageAssets.message,
54
54
  };
55
55
 
56
56
  // 气泡控制
@@ -285,6 +285,14 @@ export class AIChatUtil implements IApiAIChatUtil {
285
285
  } else {
286
286
  chatOptions.chunkEntity = ibiz.config.common.aiChunkEntity;
287
287
  }
288
+ // 计算会话主题模式
289
+ if (editorParams.topiccaptioncomputedmode) {
290
+ chatOptions.captionComputedMode = editorParams.topiccaptioncomputedmode;
291
+ } else {
292
+ chatOptions.captionComputedMode =
293
+ ibiz.config.common.aiChatTopicCaptionComputedMode;
294
+ }
295
+
288
296
  // 智能体选项(由内部获取,优化打开速度)
289
297
  chatOptions.fetchAgentList = (query?: string) => {
290
298
  return this.getAIAgentList(context, { ...params, query }, editorParams);
@@ -1021,6 +1029,15 @@ export class AIChatUtil implements IApiAIChatUtil {
1021
1029
  } else {
1022
1030
  chatOptions.chunkEntity = ibiz.config.common.aiChunkEntity;
1023
1031
  }
1032
+ // 计算会话主题模式
1033
+ if (params.hasOwnProperty('topiccaptioncomputedmode')) {
1034
+ chatOptions.captionComputedMode = params.topiccaptioncomputedmode;
1035
+ delete params.topiccaptioncomputedmode;
1036
+ } else {
1037
+ chatOptions.captionComputedMode =
1038
+ ibiz.config.common.aiChatTopicCaptionComputedMode;
1039
+ }
1040
+
1024
1041
  // 智能体选项(由内部获取,优化打开速度)
1025
1042
  chatOptions.fetchAgentList = (query?: string) => {
1026
1043
  return this.getAIAgentList(context, { ...params, query });
@@ -27,7 +27,7 @@ export const View403 = defineComponent({
27
27
  <div class={[this.ns.b(), this.ns.is('top', this.isTop)]}>
28
28
  <img
29
29
  class={this.ns.b('img')}
30
- src={`${ibiz.env.assetsUrl}/images/403.png`}
30
+ src={ibiz.config.imageAssets.noPermission}
31
31
  />
32
32
  <div class={this.ns.b('text')}>
33
33
  <div class={this.ns.be('text', 'text1')}>