@ibiz-template/vue3-components 0.7.41-alpha.94 → 0.7.41-alpha.95
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-1KhprUjB.js +339 -0
- package/dist/index-ChKlnzfZ.js +1 -0
- package/dist/index-DiSn0c6_.js +1 -0
- package/dist/{index.es-DFx4k2jd.js → index.es-Cvhhf-Jp.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-DYEAyKoh.js → wang-editor-D7CsxIdH.js} +1 -1
- package/dist/{xlsx-util-DwFMdVBD.js → xlsx-util-Dq_UVHCG.js} +1 -1
- package/es/common/emoji-select/components/categories/categories.mjs +1 -1
- package/es/common/rawitem/rawitem.mjs +1 -0
- package/es/control/dashboard/dashboard-design/dashboard-design.mjs +9 -2
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.mjs +1 -1
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.css +1 -0
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +91 -0
- package/es/editor/ai-chat/embed-ai-chat-editor.controller.mjs +70 -0
- package/es/editor/ai-chat/embed-ai-chat-editor.provider.mjs +22 -0
- package/es/editor/ai-chat/index.mjs +5 -0
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +1 -1
- package/es/editor/index.mjs +8 -0
- package/es/index.mjs +1 -0
- package/es/locale/en/index.mjs +2 -1
- package/es/locale/zh-CN/index.mjs +2 -1
- package/es/panel-component/user-message/user-message.mjs +2 -3
- package/es/util/ai-chat-util/ai-chat-util.mjs +34 -1
- package/es/util/app-util/app-util.mjs +12 -23
- package/es/view/login-view/login-view.mjs +7 -11
- package/es/view-engine/login-view.engine.mjs +12 -21
- package/es/view-engine/pickup-tree-view.engine.mjs +17 -1
- package/es/web-app/guard/auth-guard/auth-guard.mjs +5 -9
- package/es/web-app/index.mjs +2 -0
- package/es/web-app/main.mjs +3 -1
- package/es/web-app/util/app-func-block-provider/app-func-block-provider.mjs +98 -0
- package/es/web-app/util/index.mjs +1 -0
- package/lib/common/emoji-select/components/categories/categories.cjs +1 -1
- package/lib/common/rawitem/rawitem.cjs +1 -0
- package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +9 -2
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.cjs +1 -1
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +93 -0
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.css +1 -0
- package/lib/editor/ai-chat/embed-ai-chat-editor.controller.cjs +72 -0
- package/lib/editor/ai-chat/embed-ai-chat-editor.provider.cjs +24 -0
- package/lib/editor/ai-chat/index.cjs +11 -0
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +1 -1
- package/lib/editor/index.cjs +8 -0
- package/lib/index.cjs +2 -0
- package/lib/locale/en/index.cjs +2 -1
- package/lib/locale/zh-CN/index.cjs +2 -1
- package/lib/panel-component/user-message/user-message.cjs +2 -3
- package/lib/util/ai-chat-util/ai-chat-util.cjs +33 -0
- package/lib/util/app-util/app-util.cjs +11 -22
- package/lib/view/login-view/login-view.cjs +7 -11
- package/lib/view-engine/login-view.engine.cjs +11 -20
- package/lib/view-engine/pickup-tree-view.engine.cjs +17 -1
- package/lib/web-app/guard/auth-guard/auth-guard.cjs +5 -9
- package/lib/web-app/index.cjs +3 -0
- package/lib/web-app/main.cjs +2 -0
- package/lib/web-app/util/app-func-block-provider/app-func-block-provider.cjs +100 -0
- package/lib/web-app/util/index.cjs +2 -0
- package/package.json +5 -5
- package/dist/index-CVIuun-0.js +0 -339
- package/dist/index-DWSyHHzh.js +0 -1
- package/dist/index-X0zcJbo7.js +0 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
class AppFuncBlockProvider {
|
|
3
|
+
/**
|
|
4
|
+
* @description 登录
|
|
5
|
+
* @author tony001
|
|
6
|
+
* @date 2026-05-13 15:05:24
|
|
7
|
+
* @param {ILoginContext} ctx
|
|
8
|
+
* @param {(result: boolean) => void} [requestedCallback] 数据响应成功的回调
|
|
9
|
+
* @returns {*} {Promise<boolean>}
|
|
10
|
+
* @memberof AppFuncBlockProvider
|
|
11
|
+
*/
|
|
12
|
+
async login(ctx, requestedCallback) {
|
|
13
|
+
const { loginname, password, rememberme, headers } = ctx;
|
|
14
|
+
const bol = await ibiz.auth.login(loginname, password, rememberme, headers);
|
|
15
|
+
if (requestedCallback) {
|
|
16
|
+
requestedCallback(bol);
|
|
17
|
+
}
|
|
18
|
+
if (bol === true) {
|
|
19
|
+
const loginFailed = window.location.href.indexOf("srfthird_auth_success=false") >= 0;
|
|
20
|
+
const hash = window.location.hash.substring(1);
|
|
21
|
+
const regex = new RegExp("[?&]ru=([^&]*)");
|
|
22
|
+
const match = hash.match(regex);
|
|
23
|
+
const ru = match ? decodeURIComponent(match[1]) : null;
|
|
24
|
+
window.location.hash = ru || "/";
|
|
25
|
+
window.history.pushState({}, "");
|
|
26
|
+
if (loginFailed) {
|
|
27
|
+
const path = window.location.href.replace(
|
|
28
|
+
"?srfthird_auth_success=false",
|
|
29
|
+
""
|
|
30
|
+
);
|
|
31
|
+
window.location.href = path;
|
|
32
|
+
} else {
|
|
33
|
+
window.location.reload();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return bol;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @description 登出
|
|
40
|
+
* @author tony001
|
|
41
|
+
* @date 2026-05-13 16:05:28
|
|
42
|
+
* @param {IData} [params]
|
|
43
|
+
* @returns {*} {Promise<boolean>}
|
|
44
|
+
* @memberof AppFuncBlockProvider
|
|
45
|
+
*/
|
|
46
|
+
async logout(params) {
|
|
47
|
+
const bol = await ibiz.auth.logout();
|
|
48
|
+
if (bol) {
|
|
49
|
+
const path = window.location;
|
|
50
|
+
if (path.search.indexOf("isAnonymous=true") !== -1) {
|
|
51
|
+
const href = "".concat(path.origin).concat(path.pathname).concat(path.hash);
|
|
52
|
+
window.history.replaceState({}, "", href);
|
|
53
|
+
}
|
|
54
|
+
if (params && params.router) {
|
|
55
|
+
await params.router.push("/login");
|
|
56
|
+
ibiz.util.showAppLoading();
|
|
57
|
+
window.location.reload();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return bol;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @description 加载应用数据
|
|
64
|
+
* @author tony001
|
|
65
|
+
* @date 2026-05-13 16:05:52
|
|
66
|
+
* @param {IParams} [context]
|
|
67
|
+
* @returns {*} {Promise<{ ok: boolean; data: IAppData }>}
|
|
68
|
+
* @memberof AppFuncBlockProvider
|
|
69
|
+
*/
|
|
70
|
+
async loadAppData(context) {
|
|
71
|
+
let res;
|
|
72
|
+
if (context && Object.keys(context).length > 0) {
|
|
73
|
+
res = await ibiz.net.get("/appdata", context);
|
|
74
|
+
} else {
|
|
75
|
+
res = await ibiz.net.get("/appdata");
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
ok: res.ok,
|
|
79
|
+
data: res.data
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @description 获取组织数据
|
|
84
|
+
* @author tony001
|
|
85
|
+
* @date 2026-05-13 16:05:36
|
|
86
|
+
* @returns {*} {Promise<{ ok: boolean; data: IOrgData[] }>}
|
|
87
|
+
* @memberof AppFuncBlockProvider
|
|
88
|
+
*/
|
|
89
|
+
async loadOrgData() {
|
|
90
|
+
const res = await ibiz.net.get("/uaa/getbydcsystem/".concat(ibiz.env.dcSystem));
|
|
91
|
+
return {
|
|
92
|
+
ok: res.ok,
|
|
93
|
+
data: res.data
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { AppFuncBlockProvider };
|
|
@@ -41,7 +41,7 @@ const Categories = /* @__PURE__ */ vue.defineComponent({
|
|
|
41
41
|
"onClick": () => this.onSelect(category)
|
|
42
42
|
}, [vue.createVNode("span", {
|
|
43
43
|
"class": this.ns.em("category", "svg"),
|
|
44
|
-
"title": core.showTitle(category.
|
|
44
|
+
"title": core.showTitle(category.text),
|
|
45
45
|
"innerHTML": category.icon
|
|
46
46
|
}, null)]);
|
|
47
47
|
})]);
|
|
@@ -129,6 +129,7 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
129
129
|
if (["TEXT", "HEADING1", "HEADING2", "HEADING3", "HEADING4", "HEADING5", "HEADING6", "PARAGRAPH", "HTML", "RAW"].includes(rawItemType.value)) {
|
|
130
130
|
rawItemText.value = rawItemContent.value;
|
|
131
131
|
if (typeof rawItemText.value === "string") {
|
|
132
|
+
rawItemText.value = ibiz.appUtil.resolveI18nText(rawItemText.value);
|
|
132
133
|
const val = rawItemText.value;
|
|
133
134
|
rawItemText.value = val.replace(/</g, "<").replace(/>/g, ">").replace(/&nbsp;/g, " ").replace(/ /g, " ");
|
|
134
135
|
}
|
|
@@ -135,7 +135,7 @@ const DashboardDesign = /* @__PURE__ */ vue.defineComponent({
|
|
|
135
135
|
const categoryTag = props.dashboard.controlParams.categorytag;
|
|
136
136
|
const portletNameTag = props.dashboard.controlParams.portletnametag;
|
|
137
137
|
app.model.appPortlets.forEach((portlet) => {
|
|
138
|
-
var _a, _b;
|
|
138
|
+
var _a, _b, _c;
|
|
139
139
|
if (!isDEView && !portlet.enableAppDashboard) {
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
@@ -162,13 +162,20 @@ const DashboardDesign = /* @__PURE__ */ vue.defineComponent({
|
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
+
let groupName = (portletCat == null ? void 0 : portletCat.name) || "";
|
|
166
|
+
if (portletCat == null ? void 0 : portletCat.ungroup) {
|
|
167
|
+
groupName = ibiz.i18n.t("control.dashboard.dashboardDesign.unGroup");
|
|
168
|
+
}
|
|
169
|
+
if ((_c = portletCat == null ? void 0 : portletCat.nameLanguageRes) == null ? void 0 : _c.lanResTag) {
|
|
170
|
+
groupName = ibiz.i18n.t(portletCat.nameLanguageRes.lanResTag, groupName);
|
|
171
|
+
}
|
|
165
172
|
const temp = {
|
|
166
173
|
type: "app",
|
|
167
174
|
portletCodeName: portlet.codeName,
|
|
168
175
|
portletName: portlet.name,
|
|
169
176
|
portletImage: portlet.control.sysImage,
|
|
170
177
|
groupCodeName: (portletCat == null ? void 0 : portletCat.codeName) || "",
|
|
171
|
-
groupName
|
|
178
|
+
groupName,
|
|
172
179
|
appCodeName: portlet.appDataEntityId || app.model.pkgcodeName,
|
|
173
180
|
appName: app.model.name
|
|
174
181
|
};
|
|
@@ -435,7 +435,7 @@ const SwimlaneKanban = /* @__PURE__ */ vue.defineComponent({
|
|
|
435
435
|
"class": ns.em("cell", "right")
|
|
436
436
|
}, [vue.createVNode("span", {
|
|
437
437
|
"class": ns.em("cell", "description")
|
|
438
|
-
}, ["".concat(lane.count, "
|
|
438
|
+
}, ["".concat(lane.count, " ").concat(ibiz.i18n.t("app.piece")).concat(c.laneDescription)])])])]), c.state.groups.map((group) => {
|
|
439
439
|
if (group.hidden)
|
|
440
440
|
return void 0;
|
|
441
441
|
return renderBodyCell(index, lane, group);
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var qxUtil = require('qx-util');
|
|
5
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
+
require('./embed-ai-chat.css');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
const IBizEmbedAIChat = /* @__PURE__ */ vue.defineComponent({
|
|
10
|
+
name: "IBizEmbedAIChat",
|
|
11
|
+
props: vue3Util.getInputProps(),
|
|
12
|
+
emits: vue3Util.getEditorEmits(),
|
|
13
|
+
setup(props) {
|
|
14
|
+
const ns = vue3Util.useNamespace("embed-ai-chat");
|
|
15
|
+
const c = props.controller;
|
|
16
|
+
const aiChatElementRef = vue.ref(null);
|
|
17
|
+
const mountedAIChat = async () => {
|
|
18
|
+
var _a;
|
|
19
|
+
const appDataEntityId = c.model.appDataEntityId;
|
|
20
|
+
const chatInstance = c.chatInstance;
|
|
21
|
+
if (!appDataEntityId || !c.deACMode || !chatInstance)
|
|
22
|
+
return;
|
|
23
|
+
const topicId = qxUtil.createUUID();
|
|
24
|
+
const sessionid = ibiz.aiChatUtil.getChatSessionId("TOPIC", topicId);
|
|
25
|
+
const topicCaption = "[".concat(c.deACMode.logicName, "]").concat(((_a = props.data) == null ? void 0 : _a.srfmajortext) || "");
|
|
26
|
+
const tempParams = {
|
|
27
|
+
...c.params,
|
|
28
|
+
...{
|
|
29
|
+
srfactag: c.deACMode.codeName
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const {
|
|
33
|
+
topicOptions,
|
|
34
|
+
chatOptions
|
|
35
|
+
} = await ibiz.aiChatUtil.getEditorExAIChatParams(c.editorParams, c.context, c.params, props.data, c.deACMode, {
|
|
36
|
+
chatInstance,
|
|
37
|
+
view: c.view,
|
|
38
|
+
ctrl: c.ctrl
|
|
39
|
+
});
|
|
40
|
+
const resourceOptions = await ibiz.aiChatUtil.getAIResourceOptions(c.context, c.params);
|
|
41
|
+
chatInstance.create({
|
|
42
|
+
mode: "TOPIC",
|
|
43
|
+
resourceOptions,
|
|
44
|
+
containerOptions: {
|
|
45
|
+
container: aiChatElementRef.value
|
|
46
|
+
},
|
|
47
|
+
topicOptions: {
|
|
48
|
+
appid: ibiz.env.appId,
|
|
49
|
+
id: topicId,
|
|
50
|
+
caption: topicCaption,
|
|
51
|
+
url: window.location.hash.substring(1),
|
|
52
|
+
type: c.context.srftopicpath || "default",
|
|
53
|
+
...topicOptions
|
|
54
|
+
},
|
|
55
|
+
chatOptions: {
|
|
56
|
+
caption: c.deACMode.logicName,
|
|
57
|
+
context: {
|
|
58
|
+
...c.context
|
|
59
|
+
},
|
|
60
|
+
params: tempParams,
|
|
61
|
+
appDataEntityId,
|
|
62
|
+
// 扩展参数
|
|
63
|
+
...chatOptions,
|
|
64
|
+
sessionid
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
vue.onMounted(() => {
|
|
69
|
+
mountedAIChat();
|
|
70
|
+
});
|
|
71
|
+
vue.onUnmounted(() => {
|
|
72
|
+
const chatInstance = c.chatInstance;
|
|
73
|
+
if (chatInstance) {
|
|
74
|
+
chatInstance.close();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
c,
|
|
79
|
+
ns,
|
|
80
|
+
aiChatElementRef
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
render() {
|
|
84
|
+
return vue.createVNode("div", {
|
|
85
|
+
"class": this.ns.b()
|
|
86
|
+
}, [vue.createVNode("div", {
|
|
87
|
+
"class": this.ns.e("container"),
|
|
88
|
+
"ref": "aiChatElementRef"
|
|
89
|
+
}, null)]);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
exports.IBizEmbedAIChat = IBizEmbedAIChat;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-embed-ai-chat{width:100%;height:100%}.ibiz-embed-ai-chat__container{width:100%;height:100%}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var runtime = require('@ibiz-template/runtime');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class EmbedAIChatEditorController extends runtime.EditorController {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
/**
|
|
16
|
+
* @description 聊天框实例
|
|
17
|
+
* @author tony001
|
|
18
|
+
* @date 2026-05-15 15:05:37
|
|
19
|
+
* @type {*}
|
|
20
|
+
* @memberof EmbedAIChatEditorController
|
|
21
|
+
*/
|
|
22
|
+
__publicField(this, "chatInstance");
|
|
23
|
+
/**
|
|
24
|
+
* @description 应用实体服务
|
|
25
|
+
* @author tony001
|
|
26
|
+
* @date 2026-05-15 16:05:22
|
|
27
|
+
* @type {IAppDEService}
|
|
28
|
+
* @memberof EmbedAIChatEditorController
|
|
29
|
+
*/
|
|
30
|
+
__publicField(this, "deService");
|
|
31
|
+
/**
|
|
32
|
+
* @description 自填模式
|
|
33
|
+
* @author tony001
|
|
34
|
+
* @date 2026-05-15 16:05:30
|
|
35
|
+
* @type {IAppDEACMode}
|
|
36
|
+
* @memberof EmbedAIChatEditorController
|
|
37
|
+
*/
|
|
38
|
+
__publicField(this, "deACMode");
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @description 初始化
|
|
42
|
+
* @author tony001
|
|
43
|
+
* @date 2026-05-15 16:05:12
|
|
44
|
+
* @protected
|
|
45
|
+
* @returns {*} {Promise<void>}
|
|
46
|
+
* @memberof EmbedAIChatEditorController
|
|
47
|
+
*/
|
|
48
|
+
async onInit() {
|
|
49
|
+
await super.onInit();
|
|
50
|
+
const model = this.model;
|
|
51
|
+
if (model.appDEACModeId) {
|
|
52
|
+
this.deACMode = await runtime.getDeACMode(
|
|
53
|
+
model.appDEACModeId,
|
|
54
|
+
model.appDataEntityId,
|
|
55
|
+
this.context.srfappid
|
|
56
|
+
);
|
|
57
|
+
if (this.deACMode) {
|
|
58
|
+
if (this.deACMode.actype === "CHATCOMPLETION" && ibiz.env.enableAI) {
|
|
59
|
+
this.deService = await ibiz.hub.getApp(model.appId).deService.getService(this.context, model.appDataEntityId);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const module = await import('@ibiz-template-plugin/ai-chat');
|
|
64
|
+
if (module && module.createFlatChat) {
|
|
65
|
+
this.chatInstance = module.createFlatChat();
|
|
66
|
+
} else if (module && module.default && module.default.createFlatChat) {
|
|
67
|
+
this.chatInstance = module.default.createFlatChat();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
exports.EmbedAIChatEditorController = EmbedAIChatEditorController;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var embedAiChatEditor_controller = require('./embed-ai-chat-editor.controller.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class EmbedAIChatEditorProvider {
|
|
13
|
+
constructor() {
|
|
14
|
+
__publicField(this, "formEditor", "IBizEmbedAIChat");
|
|
15
|
+
__publicField(this, "gridEditor", "IBizEmbedAIChat");
|
|
16
|
+
}
|
|
17
|
+
async createController(editorModel, parentController) {
|
|
18
|
+
const c = new embedAiChatEditor_controller.EmbedAIChatEditorController(editorModel, parentController);
|
|
19
|
+
await c.init();
|
|
20
|
+
return c;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.EmbedAIChatEditorProvider = EmbedAIChatEditorProvider;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var embedAiChat = require('./embed-ai-chat/embed-ai-chat.cjs');
|
|
4
|
+
var embedAiChatEditor_controller = require('./embed-ai-chat-editor.controller.cjs');
|
|
5
|
+
var embedAiChatEditor_provider = require('./embed-ai-chat-editor.provider.cjs');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
9
|
+
exports.IBizEmbedAIChat = embedAiChat.IBizEmbedAIChat;
|
|
10
|
+
exports.EmbedAIChatEditorController = embedAiChatEditor_controller.EmbedAIChatEditorController;
|
|
11
|
+
exports.EmbedAIChatEditorProvider = embedAiChatEditor_provider.EmbedAIChatEditorProvider;
|
|
@@ -81,7 +81,7 @@ const IBizDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
81
81
|
if (c.blankItemName && !c.multiple) {
|
|
82
82
|
items.value = [{
|
|
83
83
|
value: void 0,
|
|
84
|
-
text: c.blankItemName
|
|
84
|
+
text: ibiz.appUtil.resolveI18nText(c.blankItemName)
|
|
85
85
|
}, ...codeList];
|
|
86
86
|
} else {
|
|
87
87
|
items.value = codeList;
|
package/lib/editor/index.cjs
CHANGED
|
@@ -34,6 +34,7 @@ require('./carousel/index.cjs');
|
|
|
34
34
|
require('./user/ibiz-searchcond-edit/index.cjs');
|
|
35
35
|
require('./date-range-select/index.cjs');
|
|
36
36
|
require('./map-picker/index.cjs');
|
|
37
|
+
require('./ai-chat/index.cjs');
|
|
37
38
|
var ibizImageCropping = require('./upload/ibiz-image-cropping/ibiz-image-cropping.cjs');
|
|
38
39
|
var span = require('./span/span/span.cjs');
|
|
39
40
|
var spanLink = require('./span/span-link/span-link.cjs');
|
|
@@ -77,6 +78,7 @@ var ibizPresetRawitem = require('./preset/preset-rawitem/ibiz-preset-rawitem/ibi
|
|
|
77
78
|
var ibizSearchcondEdit = require('./user/ibiz-searchcond-edit/ibiz-searchcond-edit.cjs');
|
|
78
79
|
var ibizCarousel = require('./carousel/ibiz-carousel/ibiz-carousel.cjs');
|
|
79
80
|
var ibizMapPicker = require('./map-picker/ibiz-map-picker/ibiz-map-picker.cjs');
|
|
81
|
+
var embedAiChat = require('./ai-chat/embed-ai-chat/embed-ai-chat.cjs');
|
|
80
82
|
var dateRangeSelect = require('./date-range-select/date-range-select-picker/date-range-select.cjs');
|
|
81
83
|
var ibizVirtualizedList = require('./dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs');
|
|
82
84
|
var spanEditor_provider = require('./span/span-editor.provider.cjs');
|
|
@@ -106,6 +108,7 @@ var cascaderEditor_provider = require('./cascader/cascader-editor.provider.cjs')
|
|
|
106
108
|
var colorPickerEditor_provider = require('./color-picker/color-picker-editor.provider.cjs');
|
|
107
109
|
var ibizSearchcondEdit_provider = require('./user/ibiz-searchcond-edit/ibiz-searchcond-edit.provider.cjs');
|
|
108
110
|
var mapPickerEditor_provider = require('./map-picker/map-picker-editor.provider.cjs');
|
|
111
|
+
var embedAiChatEditor_provider = require('./ai-chat/embed-ai-chat-editor.provider.cjs');
|
|
109
112
|
var carouselEditor_provider = require('./carousel/carousel-editor.provider.cjs');
|
|
110
113
|
|
|
111
114
|
"use strict";
|
|
@@ -155,6 +158,7 @@ const IBizEditor = {
|
|
|
155
158
|
v.component(ibizSearchcondEdit.IBizSearchCondEdit.name, ibizSearchcondEdit.IBizSearchCondEdit);
|
|
156
159
|
v.component(ibizCarousel.IBizCarousel.name, ibizCarousel.IBizCarousel);
|
|
157
160
|
v.component(ibizMapPicker.IBizMapPicker.name, ibizMapPicker.IBizMapPicker);
|
|
161
|
+
v.component(embedAiChat.IBizEmbedAIChat.name, embedAiChat.IBizEmbedAIChat);
|
|
158
162
|
v.component(
|
|
159
163
|
"IBizHtml",
|
|
160
164
|
vue.defineAsyncComponent(() => Promise.resolve().then(function () { return require('./html/wang-editor/wang-editor.cjs'); }))
|
|
@@ -443,6 +447,10 @@ const IBizEditor = {
|
|
|
443
447
|
() => new ibizSearchcondEdit_provider.SearchCondEditEditorProvider()
|
|
444
448
|
);
|
|
445
449
|
runtime.registerEditorProvider("MAPPICKER", () => new mapPickerEditor_provider.MapPickerEditorProvider());
|
|
450
|
+
runtime.registerEditorProvider(
|
|
451
|
+
"TEXTAREA_EMBED_AI_CHAT",
|
|
452
|
+
() => new embedAiChatEditor_provider.EmbedAIChatEditorProvider()
|
|
453
|
+
);
|
|
446
454
|
runtime.registerEditorProvider(
|
|
447
455
|
"FIELD_IMAGE_PICTURE_ONE",
|
|
448
456
|
() => new uploadEditor_provider.FileUploaderEditorProvider("PICTURE_ONE")
|
package/lib/index.cjs
CHANGED
|
@@ -193,6 +193,7 @@ var icon = require('./util/icon/icon.cjs');
|
|
|
193
193
|
var authGuard = require('./web-app/guard/auth-guard/auth-guard.cjs');
|
|
194
194
|
var main = require('./web-app/main.cjs');
|
|
195
195
|
var index$1e = require('./web-app/router/index.cjs');
|
|
196
|
+
var appFuncBlockProvider = require('./web-app/util/app-func-block-provider/app-func-block-provider.cjs');
|
|
196
197
|
|
|
197
198
|
"use strict";
|
|
198
199
|
|
|
@@ -391,3 +392,4 @@ exports.ArrowRightBold = icon.ArrowRightBold;
|
|
|
391
392
|
exports.AuthGuard = authGuard.AuthGuard;
|
|
392
393
|
exports.runApp = main.runApp;
|
|
393
394
|
exports.AppRouter = index$1e.AppRouter;
|
|
395
|
+
exports.AppFuncBlockProvider = appFuncBlockProvider.AppFuncBlockProvider;
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -39,7 +39,8 @@ var index = {
|
|
|
39
39
|
fullscreen: "Fullscreen",
|
|
40
40
|
cancelFullscreen: "Cancel fullscreen",
|
|
41
41
|
tips: "tips",
|
|
42
|
-
changeLanguage: "Switching languages requires refreshing the page to confirm the switch"
|
|
42
|
+
changeLanguage: "Switching languages requires refreshing the page to confirm the switch",
|
|
43
|
+
piece: ""
|
|
43
44
|
},
|
|
44
45
|
// 视图
|
|
45
46
|
view: {
|
|
@@ -39,7 +39,8 @@ var index = {
|
|
|
39
39
|
fullscreen: "\u5168\u5C4F",
|
|
40
40
|
cancelFullscreen: "\u53D6\u6D88\u5168\u5C4F",
|
|
41
41
|
tips: "\u63D0\u793A",
|
|
42
|
-
changeLanguage: "\u5207\u6362\u8BED\u8A00\u9700\u8981\u5237\u65B0\u9875\u9762\uFF0C\u786E\u8BA4\u5207\u6362"
|
|
42
|
+
changeLanguage: "\u5207\u6362\u8BED\u8A00\u9700\u8981\u5237\u65B0\u9875\u9762\uFF0C\u786E\u8BA4\u5207\u6362",
|
|
43
|
+
piece: "\u4E2A"
|
|
43
44
|
},
|
|
44
45
|
// 视图
|
|
45
46
|
view: {
|
|
@@ -56,9 +56,8 @@ const UserMessage = /* @__PURE__ */ vue.defineComponent({
|
|
|
56
56
|
noticeController.internalMessage.batchMarkRead();
|
|
57
57
|
};
|
|
58
58
|
const verifyAuthentication = async () => {
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
ibiz.appData = res.data;
|
|
59
|
+
const bol = await ibiz.auth.loadAppData(ibiz.appUtil.getAppContext());
|
|
60
|
+
if (bol) {
|
|
62
61
|
devtool.updateDevToolConfig();
|
|
63
62
|
}
|
|
64
63
|
};
|
|
@@ -60,6 +60,39 @@ class AIChatUtil {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
const topicOptions = {};
|
|
63
|
+
topicOptions.captionMode = ibiz.config.common.aiChatTopicCaptionMode;
|
|
64
|
+
if (editorParams.topiccaptionmode) {
|
|
65
|
+
topicOptions.captionMode = editorParams.topiccaptionmode;
|
|
66
|
+
}
|
|
67
|
+
topicOptions.hideTopicSidebar = false;
|
|
68
|
+
if (editorParams.hidetopicsidebar) {
|
|
69
|
+
topicOptions.hideTopicSidebar = editorParams.hidetopicsidebar === "true";
|
|
70
|
+
}
|
|
71
|
+
topicOptions.disableStorage = false;
|
|
72
|
+
if (editorParams.disabletopicstorage) {
|
|
73
|
+
topicOptions.disableStorage = editorParams.disabletopicstorage === "true";
|
|
74
|
+
}
|
|
75
|
+
topicOptions.beforeDelete = async (...args2) => {
|
|
76
|
+
const isBatchRemove = args2[4];
|
|
77
|
+
const result = await ibiz.confirm.warning({
|
|
78
|
+
title: ibiz.i18n.t(
|
|
79
|
+
"util.appUtil.".concat(isBatchRemove ? "clearTopic" : "aiTitle")
|
|
80
|
+
),
|
|
81
|
+
desc: ibiz.i18n.t(
|
|
82
|
+
"util.appUtil.".concat(isBatchRemove ? "clearTopicDesc" : "aiDesc")
|
|
83
|
+
)
|
|
84
|
+
});
|
|
85
|
+
return result;
|
|
86
|
+
};
|
|
87
|
+
topicOptions.action = async (action, context2, params2, data2, event) => {
|
|
88
|
+
if (action === "LINK") {
|
|
89
|
+
await ibiz.openView.push(data2.url);
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
};
|
|
93
|
+
topicOptions.configService = (appid, storageType, subType) => {
|
|
94
|
+
return new runtime.ConfigService(appid, storageType, subType);
|
|
95
|
+
};
|
|
63
96
|
const chatOptions = {
|
|
64
97
|
locale: ibiz.i18n.getLang()
|
|
65
98
|
};
|
|
@@ -83,12 +83,13 @@ class AppUtil {
|
|
|
83
83
|
* @return {*} {Promise<boolean>}
|
|
84
84
|
*/
|
|
85
85
|
async login(loginName, password, remember, headers, opts) {
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
const appFuncBlockProvider = await runtime.getAppFuncBlockProvider();
|
|
87
|
+
const bol = await appFuncBlockProvider.login({
|
|
88
|
+
loginname: loginName,
|
|
89
|
+
password,
|
|
90
|
+
rememberme: remember,
|
|
91
|
+
headers
|
|
92
|
+
});
|
|
92
93
|
return bol;
|
|
93
94
|
}
|
|
94
95
|
/**
|
|
@@ -100,22 +101,10 @@ class AppUtil {
|
|
|
100
101
|
* @return {*} {Promise<boolean>}
|
|
101
102
|
*/
|
|
102
103
|
async logout(opts) {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const href = "".concat(path.origin).concat(path.pathname).concat(path.hash);
|
|
108
|
-
window.history.replaceState({}, "", href);
|
|
109
|
-
}
|
|
110
|
-
await this.router.push(
|
|
111
|
-
// `/login?ru=${encodeURIComponent(
|
|
112
|
-
// window.location.hash.replace('#/', '/'),
|
|
113
|
-
// )}`,
|
|
114
|
-
"/login"
|
|
115
|
-
);
|
|
116
|
-
ibiz.util.showAppLoading();
|
|
117
|
-
window.location.reload();
|
|
118
|
-
}
|
|
104
|
+
const appFuncBlockProvider = await runtime.getAppFuncBlockProvider();
|
|
105
|
+
const bol = await appFuncBlockProvider.logout({
|
|
106
|
+
router: this.router
|
|
107
|
+
});
|
|
119
108
|
return bol;
|
|
120
109
|
}
|
|
121
110
|
/**
|
|
@@ -5,6 +5,7 @@ var vue3Util = require('@ibiz-template/vue3-util');
|
|
|
5
5
|
var vueRouter = require('vue-router');
|
|
6
6
|
var core = require('@ibiz-template/core');
|
|
7
7
|
var qs = require('qs');
|
|
8
|
+
var runtime = require('@ibiz-template/runtime');
|
|
8
9
|
require('../../util/index.cjs');
|
|
9
10
|
require('./login-view.css');
|
|
10
11
|
var keydownUtil = require('../../util/keydown-util/keydown-util.cjs');
|
|
@@ -78,17 +79,12 @@ const LoginView = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
79
|
formRef.value.validate(async (vaild) => {
|
|
79
80
|
if (vaild) {
|
|
80
81
|
loading.value = true;
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
window.location.href = path;
|
|
88
|
-
} else {
|
|
89
|
-
window.location.reload();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
82
|
+
const appFuncBlockProvider = await runtime.getAppFuncBlockProvider();
|
|
83
|
+
await appFuncBlockProvider.login({
|
|
84
|
+
loginname: loginData.username,
|
|
85
|
+
password: loginData.password,
|
|
86
|
+
rememberme: isRemember.value
|
|
87
|
+
});
|
|
92
88
|
loading.value = false;
|
|
93
89
|
}
|
|
94
90
|
});
|
|
@@ -95,27 +95,18 @@ class LoginViewEngine extends runtime.ViewEngineBase {
|
|
|
95
95
|
if (qxUtil.notNilEmpty(data.orgid)) {
|
|
96
96
|
username = "".concat(data.username, "@").concat(data.orgid);
|
|
97
97
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
window.history.pushState({}, "");
|
|
109
|
-
if (loginFailed) {
|
|
110
|
-
const path = window.location.href.replace(
|
|
111
|
-
"?srfthird_auth_success=false",
|
|
112
|
-
""
|
|
113
|
-
);
|
|
114
|
-
window.location.href = path;
|
|
115
|
-
} else {
|
|
116
|
-
window.location.reload();
|
|
98
|
+
const appFuncBlockProvider = await runtime.getAppFuncBlockProvider();
|
|
99
|
+
await appFuncBlockProvider.login(
|
|
100
|
+
{
|
|
101
|
+
loginname: username,
|
|
102
|
+
password: data.password,
|
|
103
|
+
rememberme,
|
|
104
|
+
headers
|
|
105
|
+
},
|
|
106
|
+
(result) => {
|
|
107
|
+
this.view.evt.emit("onAfterLogin", { ok: result, panelDataParent });
|
|
117
108
|
}
|
|
118
|
-
|
|
109
|
+
);
|
|
119
110
|
}
|
|
120
111
|
/**
|
|
121
112
|
* @description 取消变更
|
|
@@ -70,9 +70,25 @@ class PickupTreeViewEngine extends treeView_engine.TreeViewEngine {
|
|
|
70
70
|
}
|
|
71
71
|
this.setSelectedData(this.selectData);
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* @description 获取所有数据
|
|
75
|
+
* @protected
|
|
76
|
+
* @returns {*} {ITreeNodeData[]}
|
|
77
|
+
* @memberof PickupTreeViewEngine
|
|
78
|
+
*/
|
|
79
|
+
getAllData() {
|
|
80
|
+
const { state, model } = this.tree;
|
|
81
|
+
const { enableRootSelect, rootVisible, detreeNodes } = model;
|
|
82
|
+
let items = state.items.filter((item) => !item._disableSelect);
|
|
83
|
+
if (!enableRootSelect && !rootVisible && (detreeNodes == null ? void 0 : detreeNodes.length)) {
|
|
84
|
+
const rootNode = detreeNodes.find((node) => node.rootNode === true);
|
|
85
|
+
items = items.filter((item) => (rootNode == null ? void 0 : rootNode.id) !== item._nodeId);
|
|
86
|
+
}
|
|
87
|
+
return items;
|
|
88
|
+
}
|
|
73
89
|
async call(key, args) {
|
|
74
90
|
if (key === runtime.ViewCallTag.GET_ALL_DATA) {
|
|
75
|
-
return this.
|
|
91
|
+
return this.getAllData();
|
|
76
92
|
}
|
|
77
93
|
return super.call(key, args);
|
|
78
94
|
}
|