@ibiz-template/vue3-components 0.7.41-alpha.94 → 0.7.41-alpha.96
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/ibiz-markdown-editor-CQRvKzXG.js +1 -0
- package/dist/index-CSWh3Soj.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-COHR8lWq.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-DGTnSGqn.js +1 -0
- package/dist/{xlsx-util-DwFMdVBD.js → xlsx-util-CzrO72Os.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/data-view/data-view.mjs +98 -2
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.mjs +1 -1
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.mjs +77 -2
- 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 +98 -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/code/code-editor.controller.mjs +3 -3
- package/es/editor/code/monaco-editor/monaco-editor.mjs +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +1 -1
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +5 -1
- package/es/editor/index.mjs +8 -0
- package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +7 -1
- package/es/editor/text-box/input/input.mjs +5 -1
- 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 +21 -25
- 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/data-view/data-view.cjs +97 -1
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.cjs +1 -1
- package/lib/control/list/list.cjs +77 -2
- package/lib/control/list/list.css +1 -1
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +100 -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/code/code-editor.controller.cjs +3 -3
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +1 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +1 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +5 -1
- package/lib/editor/index.cjs +8 -0
- package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +7 -1
- package/lib/editor/text-box/input/input.cjs +5 -1
- 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 +20 -24
- 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 +6 -6
- package/dist/ibiz-markdown-editor-8I67TTyP.js +0 -1
- package/dist/index-CVIuun-0.js +0 -339
- package/dist/index-DWSyHHzh.js +0 -1
- package/dist/index-X0zcJbo7.js +0 -1
- package/dist/wang-editor-DYEAyKoh.js +0 -1
|
@@ -527,6 +527,80 @@ const ListControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
527
527
|
}
|
|
528
528
|
return null;
|
|
529
529
|
};
|
|
530
|
+
const renderSkeletonItem = () => {
|
|
531
|
+
return vue.createVNode("div", {
|
|
532
|
+
"class": ns.b("skeleton-item")
|
|
533
|
+
}, [vue.createVNode(vue.resolveComponent("el-skeleton"), {
|
|
534
|
+
"animated": true,
|
|
535
|
+
"rows": 1
|
|
536
|
+
}, {
|
|
537
|
+
template: () => vue.createVNode(vue.resolveComponent("el-skeleton-item"), {
|
|
538
|
+
"variant": "rect"
|
|
539
|
+
}, null)
|
|
540
|
+
})]);
|
|
541
|
+
};
|
|
542
|
+
const renderGroupSkeleton = () => {
|
|
543
|
+
return vue.createVNode("div", {
|
|
544
|
+
"class": ns.b("skeleton")
|
|
545
|
+
}, [Array.from({
|
|
546
|
+
length: 3
|
|
547
|
+
}, () => vue.createVNode("div", {
|
|
548
|
+
"class": ns.b("skeleton-group")
|
|
549
|
+
}, [vue.createVNode("div", {
|
|
550
|
+
"class": ns.be("skeleton-group", "header")
|
|
551
|
+
}, [vue.createVNode(vue.resolveComponent("el-skeleton"), {
|
|
552
|
+
"animated": true,
|
|
553
|
+
"rows": 1
|
|
554
|
+
}, {
|
|
555
|
+
template: () => vue.createVNode(vue.resolveComponent("el-skeleton-item"), {
|
|
556
|
+
"variant": "rect",
|
|
557
|
+
"style": "width: 15%"
|
|
558
|
+
}, null)
|
|
559
|
+
})]), vue.createVNode("div", {
|
|
560
|
+
"class": [ns.be("skeleton", "content"), ns.be("skeleton-group", "content")]
|
|
561
|
+
}, [Array.from({
|
|
562
|
+
length: 3
|
|
563
|
+
}, () => renderSkeletonItem())])]))]);
|
|
564
|
+
};
|
|
565
|
+
const renderGroupStyle2Skeleton = () => {
|
|
566
|
+
return vue.createVNode("div", {
|
|
567
|
+
"class": ns.b("skeleton")
|
|
568
|
+
}, [Array.from({
|
|
569
|
+
length: 3
|
|
570
|
+
}, () => vue.createVNode("div", {
|
|
571
|
+
"class": [ns.b("skeleton-group"), ns.b("skeleton-group-style2")]
|
|
572
|
+
}, [vue.createVNode("div", {
|
|
573
|
+
"class": [ns.be("skeleton-group", "header"), ns.be("skeleton-group-style2", "header")]
|
|
574
|
+
}, [vue.createVNode(vue.resolveComponent("el-skeleton"), {
|
|
575
|
+
"animated": true,
|
|
576
|
+
"rows": 1,
|
|
577
|
+
"style": "width: 15%"
|
|
578
|
+
}, {
|
|
579
|
+
template: () => vue.createVNode(vue.resolveComponent("el-skeleton-item"), {
|
|
580
|
+
"variant": "rect"
|
|
581
|
+
}, null)
|
|
582
|
+
})]), vue.createVNode("div", {
|
|
583
|
+
"class": [ns.be("skeleton", "content"), ns.be("skeleton-group", "content"), ns.be("skeleton-group-style2", "content")]
|
|
584
|
+
}, [Array.from({
|
|
585
|
+
length: 3
|
|
586
|
+
}, () => renderSkeletonItem())])]))]);
|
|
587
|
+
};
|
|
588
|
+
const renderSkeleton = () => {
|
|
589
|
+
if (c.state.enableGroup && !c.state.isSimple) {
|
|
590
|
+
if (c.model.groupStyle === "STYLE2") {
|
|
591
|
+
return renderGroupStyle2Skeleton();
|
|
592
|
+
}
|
|
593
|
+
return renderGroupSkeleton();
|
|
594
|
+
}
|
|
595
|
+
const count = c.state.size || 6;
|
|
596
|
+
return vue.createVNode("div", {
|
|
597
|
+
"class": ns.b("skeleton")
|
|
598
|
+
}, [vue.createVNode("div", {
|
|
599
|
+
"class": ns.be("skeleton", "content")
|
|
600
|
+
}, [Array.from({
|
|
601
|
+
length: Math.min(count, 20)
|
|
602
|
+
}, () => renderSkeletonItem())])]);
|
|
603
|
+
};
|
|
530
604
|
return {
|
|
531
605
|
c,
|
|
532
606
|
ns,
|
|
@@ -538,13 +612,14 @@ const ListControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
538
612
|
onPageSizeChange,
|
|
539
613
|
renderListContent,
|
|
540
614
|
renderBatchToolBar,
|
|
541
|
-
renderCollapseExpandIcon
|
|
615
|
+
renderCollapseExpandIcon,
|
|
616
|
+
renderSkeleton
|
|
542
617
|
};
|
|
543
618
|
},
|
|
544
619
|
render() {
|
|
545
620
|
let content = null;
|
|
546
621
|
if (this.c.state.isCreated) {
|
|
547
|
-
content = [this.c.state.items.length > 0 ? this.renderListContent() : this.renderNoData(), this.renderBatchToolBar(), this.c.state.enablePagingBar && this.c.model.pagingMode === 1 ? vue.createVNode(vue.resolveComponent("iBizPagination"), {
|
|
622
|
+
content = [!this.c.state.isLoaded ? this.renderSkeleton() : this.c.state.items.length > 0 ? this.renderListContent() : this.renderNoData(), this.renderBatchToolBar(), this.c.state.enablePagingBar && this.c.model.pagingMode === 1 ? vue.createVNode(vue.resolveComponent("iBizPagination"), {
|
|
548
623
|
"mode": this.c.paginationMode,
|
|
549
624
|
"class": this.ns.e("pagination"),
|
|
550
625
|
"total": this.c.state.total,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-list-item{flex-grow:1;min-height:var(--ibiz-control-list-item-height);padding:var(--ibiz-control-list-padding);font-weight:var(--ibiz-control-list-font-weight);color:var(--ibiz-control-list-text-color);cursor:pointer;background-color:var(--ibiz-control-list-item-bg-color)}.ibiz-control-list-item__right{padding:0 var(--ibiz-spacing-extra-tight)}.ibiz-control-list-item__right--actions{display:flex;-moz-column-gap:var(--ibiz-spacing-extra-tight);column-gap:var(--ibiz-spacing-extra-tight);justify-content:center}.ibiz-control-list-item__right--actions .ibiz-action-toolbar__item{margin:0}.ibiz-control-list-item__right--actions .ibiz-action-toolbar__item--label.is-has-caption{margin:0}.ibiz-control-list-item:has(.ibiz-control-list-item__right){display:flex;justify-content:space-between}.ibiz-control-list-item:has(.ibiz-control-list-item__right) .ibiz-control-list-item__caption{flex:1}.ibiz-control-list-item__new{display:flex;align-items:center;justify-content:center;margin-top:var(--ibiz-spacing-tight);color:var(--ibiz-color-text-3);border:2px dashed var(--ibiz-color-border)}.ibiz-control-list{--ibiz-control-list-text-color:var(--ibiz-color-text-0);--ibiz-control-list-load-more-color:var(--ibiz-color-text-2);--ibiz-control-list-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-control-list-active-bg-color:var(--ibiz-color-fill-2);--ibiz-control-list-font-weight:var(--ibiz-font-weight-regular);--ibiz-control-list-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-tight);--ibiz-control-list-item-bg-color:unset;display:flex;flex-flow:column nowrap;align-items:stretch;justify-content:flex-start;position:relative;height:100%}.ibiz-control-list__drag-icon{cursor:move;visibility:hidden}.ibiz-control-list__nav-icon{position:absolute;top:18px;right:10px;color:var(--ibiz-color-primary);cursor:pointer}.ibiz-control-list__load-more{text-align:center}.ibiz-control-list__load-more i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-control-list-load-more-color);cursor:pointer}.ibiz-control-list__load-more i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-list__collapse-expand-icon{width:calc(100% - var(--ibiz-spacing-base-tight));text-align:center}.ibiz-control-list__collapse-expand-icon i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-list__collapse-expand-icon i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-list__load-more-button{padding:var(--ibiz-control-list-padding);text-align:center}.ibiz-control-list__quicktoolbar{display:flex;justify-content:center;width:100%}.ibiz-control-list__batchtoolbar{display:none;margin:var(--ibiz-spacing-tight) 0}.ibiz-control-list__batchtoolbar.is-show{display:block}.ibiz-control-list .ibiz-control-list-content{flex-grow:1}.ibiz-control-list-content.is-show-underLine .ibiz-control-list-scroll-item{border-bottom:1px solid var(--ibiz-color-border)}.ibiz-control-list-content .ibiz-row-detail:last-of-type .ibiz-control-list-scroll-item{border-bottom:none}.ibiz-control-list-scroll{height:100%;overflow:auto}.ibiz-control-list-scroll.is-reverse-scroll .ibiz-control-list__layout-flex{display:flex;flex-direction:column-reverse}.ibiz-control-list-group-content__item-header{display:flex;align-items:center;justify-content:space-between;width:100%}.ibiz-control-list-scroll-item{display:flex;align-items:center}.ibiz-control-list-scroll-item__checkbox{flex-shrink:0;margin-left:var(--ibiz-spacing-tight)}.ibiz-control-list-scroll-item__icon{flex-shrink:0;margin-left:var(--ibiz-spacing-tight);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-list-scroll-item:hover{background-color:var(--ibiz-control-list-hover-bg-color)}.ibiz-control-list-scroll-item:hover .ibiz-control-list__drag-icon{visibility:visible}.ibiz-control-list-scroll-item.is-active{background-color:var(--ibiz-control-list-active-bg-color)}.ibiz-control-list-group-style2{--ibiz-control-list-group-style2-color:var(--ibiz-color-disabled-text)}.ibiz-control-list-group-style2__header{display:flex;align-items:center;justify-content:center;width:100%}.ibiz-control-list-group-style2__header--title{padding:0 var(--ibiz-spacing-tight);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-control-list-group-style2-color)}.ibiz-control-list-group-style2__header::after,.ibiz-control-list-group-style2__header::before{display:block;flex:1;height:1px;margin-top:1px;content:"";border-top:1px var(--ibiz-color-border) solid;transform:translateY(-50%)}
|
|
1
|
+
.ibiz-control-list-item{flex-grow:1;min-height:var(--ibiz-control-list-item-height);padding:var(--ibiz-control-list-padding);font-weight:var(--ibiz-control-list-font-weight);color:var(--ibiz-control-list-text-color);cursor:pointer;background-color:var(--ibiz-control-list-item-bg-color)}.ibiz-control-list-item__right{padding:0 var(--ibiz-spacing-extra-tight)}.ibiz-control-list-item__right--actions{display:flex;-moz-column-gap:var(--ibiz-spacing-extra-tight);column-gap:var(--ibiz-spacing-extra-tight);justify-content:center}.ibiz-control-list-item__right--actions .ibiz-action-toolbar__item{margin:0}.ibiz-control-list-item__right--actions .ibiz-action-toolbar__item--label.is-has-caption{margin:0}.ibiz-control-list-item:has(.ibiz-control-list-item__right){display:flex;justify-content:space-between}.ibiz-control-list-item:has(.ibiz-control-list-item__right) .ibiz-control-list-item__caption{flex:1}.ibiz-control-list-item__new{display:flex;align-items:center;justify-content:center;margin-top:var(--ibiz-spacing-tight);color:var(--ibiz-color-text-3);border:2px dashed var(--ibiz-color-border)}.ibiz-control-list{--ibiz-control-list-text-color:var(--ibiz-color-text-0);--ibiz-control-list-load-more-color:var(--ibiz-color-text-2);--ibiz-control-list-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-control-list-active-bg-color:var(--ibiz-color-fill-2);--ibiz-control-list-font-weight:var(--ibiz-font-weight-regular);--ibiz-control-list-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-tight);--ibiz-control-list-item-bg-color:unset;display:flex;flex-flow:column nowrap;align-items:stretch;justify-content:flex-start;position:relative;height:100%}.ibiz-control-list__drag-icon{cursor:move;visibility:hidden}.ibiz-control-list__nav-icon{position:absolute;top:18px;right:10px;color:var(--ibiz-color-primary);cursor:pointer}.ibiz-control-list__load-more{text-align:center}.ibiz-control-list__load-more i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-control-list-load-more-color);cursor:pointer}.ibiz-control-list__load-more i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-list__collapse-expand-icon{width:calc(100% - var(--ibiz-spacing-base-tight));text-align:center}.ibiz-control-list__collapse-expand-icon i{font-size:var(--ibiz-font-size-header-3);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-list__collapse-expand-icon i:hover{color:var(--ibiz-color-primary-light-hover)}.ibiz-control-list__load-more-button{padding:var(--ibiz-control-list-padding);text-align:center}.ibiz-control-list__quicktoolbar{display:flex;justify-content:center;width:100%}.ibiz-control-list__batchtoolbar{display:none;margin:var(--ibiz-spacing-tight) 0}.ibiz-control-list__batchtoolbar.is-show{display:block}.ibiz-control-list .ibiz-control-list-content{flex-grow:1}.ibiz-control-list-content.is-show-underLine .ibiz-control-list-scroll-item{border-bottom:1px solid var(--ibiz-color-border)}.ibiz-control-list-content .ibiz-row-detail:last-of-type .ibiz-control-list-scroll-item{border-bottom:none}.ibiz-control-list-scroll{height:100%;overflow:auto}.ibiz-control-list-scroll.is-reverse-scroll .ibiz-control-list__layout-flex{display:flex;flex-direction:column-reverse}.ibiz-control-list-group-content__item-header{display:flex;align-items:center;justify-content:space-between;width:100%}.ibiz-control-list-scroll-item{display:flex;align-items:center}.ibiz-control-list-scroll-item__checkbox{flex-shrink:0;margin-left:var(--ibiz-spacing-tight)}.ibiz-control-list-scroll-item__icon{flex-shrink:0;margin-left:var(--ibiz-spacing-tight);color:var(--ibiz-color-text-2);cursor:pointer}.ibiz-control-list-scroll-item:hover{background-color:var(--ibiz-control-list-hover-bg-color)}.ibiz-control-list-scroll-item:hover .ibiz-control-list__drag-icon{visibility:visible}.ibiz-control-list-scroll-item.is-active{background-color:var(--ibiz-control-list-active-bg-color)}.ibiz-control-list-group-style2{--ibiz-control-list-group-style2-color:var(--ibiz-color-disabled-text)}.ibiz-control-list-group-style2__header{display:flex;align-items:center;justify-content:center;width:100%}.ibiz-control-list-group-style2__header--title{padding:0 var(--ibiz-spacing-tight);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-control-list-group-style2-color)}.ibiz-control-list-group-style2__header::after,.ibiz-control-list-group-style2__header::before{display:block;flex:1;height:1px;margin-top:1px;content:"";border-top:1px var(--ibiz-color-border) solid;transform:translateY(-50%)}.ibiz-control-list-skeleton-item{padding-bottom:var(--ibiz-spacing-tight)}.ibiz-control-list-skeleton-group__header{margin-bottom:var(--ibiz-spacing-base)}.ibiz-control-list-skeleton-group-style2__header{display:flex;justify-content:center}
|
|
@@ -0,0 +1,100 @@
|
|
|
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, _b;
|
|
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 tempParams = {
|
|
26
|
+
...c.params,
|
|
27
|
+
...{
|
|
28
|
+
srfactag: c.deACMode.codeName
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const {
|
|
32
|
+
topicOptions,
|
|
33
|
+
chatOptions
|
|
34
|
+
} = await ibiz.aiChatUtil.getEditorExAIChatParams(c.editorParams, c.context, c.params, props.data, c.deACMode, {
|
|
35
|
+
chatInstance,
|
|
36
|
+
view: c.view,
|
|
37
|
+
ctrl: c.ctrl
|
|
38
|
+
});
|
|
39
|
+
const resourceOptions = await ibiz.aiChatUtil.getAIResourceOptions(c.context, c.params);
|
|
40
|
+
let topicCaption = "[".concat(c.deACMode.logicName, "]").concat(((_a = props.data) == null ? void 0 : _a.srfmajortext) || "");
|
|
41
|
+
if (c.editorParams.srfaitopiccaption) {
|
|
42
|
+
topicCaption = "[".concat(ibiz.appUtil.resolveI18nText(c.editorParams.srfaitopiccaption), "]").concat(((_b = props.data) == null ? void 0 : _b.srfmajortext) || "");
|
|
43
|
+
}
|
|
44
|
+
let chatCaption = c.deACMode.logicName;
|
|
45
|
+
if (c.editorParams.srfaichatcaption) {
|
|
46
|
+
chatCaption = ibiz.appUtil.resolveI18nText(c.editorParams.srfaichatcaption);
|
|
47
|
+
}
|
|
48
|
+
chatInstance.create({
|
|
49
|
+
mode: "TOPIC",
|
|
50
|
+
resourceOptions,
|
|
51
|
+
containerOptions: {
|
|
52
|
+
container: aiChatElementRef.value
|
|
53
|
+
},
|
|
54
|
+
topicOptions: {
|
|
55
|
+
appid: ibiz.env.appId,
|
|
56
|
+
id: topicId,
|
|
57
|
+
caption: topicCaption,
|
|
58
|
+
url: window.location.hash.substring(1),
|
|
59
|
+
type: c.context.srftopicpath || "default",
|
|
60
|
+
...topicOptions
|
|
61
|
+
},
|
|
62
|
+
chatOptions: {
|
|
63
|
+
caption: chatCaption,
|
|
64
|
+
context: {
|
|
65
|
+
...c.context
|
|
66
|
+
},
|
|
67
|
+
params: tempParams,
|
|
68
|
+
appDataEntityId,
|
|
69
|
+
// 扩展参数
|
|
70
|
+
...chatOptions,
|
|
71
|
+
sessionid
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
vue.onMounted(() => {
|
|
76
|
+
mountedAIChat();
|
|
77
|
+
});
|
|
78
|
+
vue.onUnmounted(() => {
|
|
79
|
+
const chatInstance = c.chatInstance;
|
|
80
|
+
if (chatInstance) {
|
|
81
|
+
chatInstance.close();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
c,
|
|
86
|
+
ns,
|
|
87
|
+
aiChatElementRef
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
render() {
|
|
91
|
+
return vue.createVNode("div", {
|
|
92
|
+
"class": this.ns.b()
|
|
93
|
+
}, [vue.createVNode("div", {
|
|
94
|
+
"class": this.ns.e("container"),
|
|
95
|
+
"ref": "aiChatElementRef"
|
|
96
|
+
}, null)]);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
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;
|
|
@@ -109,7 +109,7 @@ class CodeEditorController extends runtime.EditorController {
|
|
|
109
109
|
inlineaichatheight,
|
|
110
110
|
hidelinenumbers,
|
|
111
111
|
hideminimap,
|
|
112
|
-
|
|
112
|
+
srfaichatcaption
|
|
113
113
|
} = this.editorParams;
|
|
114
114
|
if (inlineaichatheight)
|
|
115
115
|
this.inlineAiChatHeight = Number(inlineaichatheight);
|
|
@@ -117,8 +117,8 @@ class CodeEditorController extends runtime.EditorController {
|
|
|
117
117
|
this.hideLineNumbers = this.toBoolean(hidelinenumbers);
|
|
118
118
|
if (hideminimap)
|
|
119
119
|
this.hideMinimap = this.toBoolean(hideminimap);
|
|
120
|
-
if (
|
|
121
|
-
this.aiChatCaption = ibiz.appUtil.resolveI18nText(
|
|
120
|
+
if (srfaichatcaption) {
|
|
121
|
+
this.aiChatCaption = ibiz.appUtil.resolveI18nText(srfaichatcaption);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
const { appDEACModeId, appDataEntityId } = this.model;
|
|
@@ -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;
|
|
@@ -62,7 +62,7 @@ const IBizVirtualizedList = /* @__PURE__ */ vue.defineComponent({
|
|
|
62
62
|
if (c.blankItemName && !c.multiple) {
|
|
63
63
|
items.value = [{
|
|
64
64
|
value: void 0,
|
|
65
|
-
text: c.blankItemName
|
|
65
|
+
text: ibiz.appUtil.resolveI18nText(c.blankItemName)
|
|
66
66
|
}, ...codeList];
|
|
67
67
|
} else {
|
|
68
68
|
items.value = codeList;
|
|
@@ -234,6 +234,10 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
|
|
|
234
234
|
ctrl: c.ctrl
|
|
235
235
|
});
|
|
236
236
|
const resourceOptions = await ibiz.aiChatUtil.getAIResourceOptions(c.context, c.params);
|
|
237
|
+
let chatCaption = c.deACMode.logicName;
|
|
238
|
+
if (c.editorParams.srfaichatcaption) {
|
|
239
|
+
chatCaption = ibiz.appUtil.resolveI18nText(c.editorParams.srfaichatcaption);
|
|
240
|
+
}
|
|
237
241
|
chatInstance.create({
|
|
238
242
|
resourceOptions,
|
|
239
243
|
containerOptions: {
|
|
@@ -241,7 +245,7 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
|
|
|
241
245
|
...containerOptions
|
|
242
246
|
},
|
|
243
247
|
chatOptions: {
|
|
244
|
-
caption:
|
|
248
|
+
caption: chatCaption,
|
|
245
249
|
context: {
|
|
246
250
|
...c.context
|
|
247
251
|
},
|
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")
|
|
@@ -76,6 +76,12 @@ function initCustomMenu(c, opts) {
|
|
|
76
76
|
c.context,
|
|
77
77
|
c.params
|
|
78
78
|
);
|
|
79
|
+
let chatCaption = c.deACMode.logicName;
|
|
80
|
+
if (c.editorParams.srfaichatcaption) {
|
|
81
|
+
chatCaption = ibiz.appUtil.resolveI18nText(
|
|
82
|
+
c.editorParams.srfaichatcaption
|
|
83
|
+
);
|
|
84
|
+
}
|
|
79
85
|
chatInstance.create({
|
|
80
86
|
resourceOptions,
|
|
81
87
|
containerOptions: {
|
|
@@ -83,7 +89,7 @@ function initCustomMenu(c, opts) {
|
|
|
83
89
|
...containerOptions
|
|
84
90
|
},
|
|
85
91
|
chatOptions: {
|
|
86
|
-
caption:
|
|
92
|
+
caption: chatCaption,
|
|
87
93
|
context: { ...c.context },
|
|
88
94
|
params: { ...c.params, srfactag: c.deACMode.codeName },
|
|
89
95
|
appDataEntityId,
|
|
@@ -178,6 +178,10 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
178
178
|
ctrl: c.ctrl
|
|
179
179
|
});
|
|
180
180
|
const resourceOptions = await ibiz.aiChatUtil.getAIResourceOptions(c.context, c.params);
|
|
181
|
+
let chatCaption = c.deACMode.logicName;
|
|
182
|
+
if (c.editorParams.srfaichatcaption) {
|
|
183
|
+
chatCaption = ibiz.appUtil.resolveI18nText(c.editorParams.srfaichatcaption);
|
|
184
|
+
}
|
|
181
185
|
chatInstance.create({
|
|
182
186
|
resourceOptions,
|
|
183
187
|
containerOptions: {
|
|
@@ -185,7 +189,7 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
185
189
|
...containerOptions
|
|
186
190
|
},
|
|
187
191
|
chatOptions: {
|
|
188
|
-
caption:
|
|
192
|
+
caption: chatCaption,
|
|
189
193
|
context: {
|
|
190
194
|
...c.context
|
|
191
195
|
},
|
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
|
/**
|
|
@@ -248,7 +237,6 @@ class AppUtil {
|
|
|
248
237
|
let topicId = "".concat(appDataEntityId, "@").concat(appDEACModeId, "@");
|
|
249
238
|
topicId += context[appDataEntityName] ? context[appDataEntityName] : "default";
|
|
250
239
|
const sessionid = ibiz.aiChatUtil.getChatSessionId("TOPIC", topicId);
|
|
251
|
-
const topicCaption = "[".concat(deACMode.logicName, "]").concat((data == null ? void 0 : data.srfmajortext) || "");
|
|
252
240
|
const tempParams = { ...params, ...{ srfactag: deACMode.codeName } };
|
|
253
241
|
const { zIndex } = vue3Util.useUIStore();
|
|
254
242
|
const containerZIndex = zIndex.increment();
|
|
@@ -263,6 +251,14 @@ class AppUtil {
|
|
|
263
251
|
context,
|
|
264
252
|
params
|
|
265
253
|
);
|
|
254
|
+
let topicCaption = "[".concat(deACMode.logicName, "]").concat((data == null ? void 0 : data.srfmajortext) || "");
|
|
255
|
+
if (params.srfaitopiccaption) {
|
|
256
|
+
topicCaption = "[".concat(ibiz.appUtil.resolveI18nText(params.srfaitopiccaption), "]").concat((data == null ? void 0 : data.srfmajortext) || "");
|
|
257
|
+
}
|
|
258
|
+
let chatCaption = deACMode.logicName;
|
|
259
|
+
if (params.srfaichatcaption) {
|
|
260
|
+
chatCaption = ibiz.appUtil.resolveI18nText(params.srfaichatcaption);
|
|
261
|
+
}
|
|
266
262
|
return new Promise((resolve) => {
|
|
267
263
|
chatInstance.create({
|
|
268
264
|
mode: "TOPIC",
|
|
@@ -281,7 +277,7 @@ class AppUtil {
|
|
|
281
277
|
...topicOptions
|
|
282
278
|
},
|
|
283
279
|
chatOptions: {
|
|
284
|
-
caption:
|
|
280
|
+
caption: chatCaption,
|
|
285
281
|
context: { ...context },
|
|
286
282
|
params: tempParams,
|
|
287
283
|
appDataEntityId,
|