@ibiz-template/vue3-components 0.7.41-alpha.140 → 0.7.41-alpha.142
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-DrjG63wY.js +339 -0
- package/dist/{index.es-CvL4i5Jr.js → index.es-CfZdec4G.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-CwP3vIhD.js → wang-editor-CUGqp4Uw.js} +1 -1
- package/dist/{xlsx-util-BTk7f0UX.js → xlsx-util-C9Q58lgT.js} +1 -1
- package/es/common/html-doc-preview/html-doc-preview.css +1 -0
- package/es/common/html-doc-preview/html-doc-preview.mjs +76 -0
- package/es/common/index.mjs +2 -0
- package/es/common/rawitem/rawitem.mjs +13 -0
- package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +9 -3
- package/es/editor/ai-chat/embed-ai-chat/embed-ai-chat.mjs +2 -1
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +3 -0
- package/es/panel-component/index.mjs +2 -1
- package/es/util/ai-chat-util/ai-chat-util.mjs +24 -0
- package/es/view-engine/mpickup-view-engine.mjs +20 -16
- package/lib/common/html-doc-preview/html-doc-preview.cjs +78 -0
- package/lib/common/html-doc-preview/html-doc-preview.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/common/rawitem/rawitem.cjs +13 -0
- package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +8 -2
- package/lib/editor/ai-chat/embed-ai-chat/embed-ai-chat.cjs +2 -1
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +3 -0
- package/lib/panel-component/index.cjs +1 -0
- package/lib/util/ai-chat-util/ai-chat-util.cjs +24 -0
- package/lib/view-engine/mpickup-view-engine.cjs +19 -15
- package/package.json +5 -5
- package/src/common/html-doc-preview/html-doc-preview.scss +9 -0
- package/src/common/html-doc-preview/html-doc-preview.tsx +78 -0
- package/src/common/index.ts +2 -0
- package/src/common/rawitem/rawitem.tsx +12 -0
- package/src/control/form/form-detail/form-rawitem/form-rawitem.tsx +7 -0
- package/src/editor/ai-chat/embed-ai-chat/embed-ai-chat.tsx +1 -0
- package/src/editor/raw/ibiz-raw/ibiz-raw.tsx +5 -0
- package/src/panel-component/index.ts +2 -0
- package/src/util/ai-chat-util/ai-chat-util.ts +32 -0
- package/src/view-engine/mpickup-view-engine.ts +22 -16
- package/dist/index-FaVj1BJA.js +0 -339
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-html-doc-preview{width:100%}.ibiz-html-doc-preview__iframe{display:block;width:100%;border:none}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent, createVNode, ref, computed, watch } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './html-doc-preview.css';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const IBizHtmlDocPreview = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "IBizHtmlDocPreview",
|
|
8
|
+
props: {
|
|
9
|
+
// html值,完整HTML文档内容
|
|
10
|
+
value: String,
|
|
11
|
+
enableScript: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: true
|
|
14
|
+
},
|
|
15
|
+
ctrl: {
|
|
16
|
+
type: Object,
|
|
17
|
+
required: false
|
|
18
|
+
},
|
|
19
|
+
view: {
|
|
20
|
+
type: Object,
|
|
21
|
+
required: false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(props) {
|
|
25
|
+
const ns = useNamespace("html-doc-preview");
|
|
26
|
+
const iframeHeight = ref();
|
|
27
|
+
const sandbox = computed(() => {
|
|
28
|
+
if (props.enableScript) {
|
|
29
|
+
return "allow-same-origin allow-scripts";
|
|
30
|
+
}
|
|
31
|
+
return "allow-same-origin";
|
|
32
|
+
});
|
|
33
|
+
const calcHeight = (e) => {
|
|
34
|
+
const iframe = e.target;
|
|
35
|
+
const doc = iframe.contentDocument;
|
|
36
|
+
const contentWindow = iframe.contentWindow;
|
|
37
|
+
if (contentWindow) {
|
|
38
|
+
contentWindow.ctrl = props.ctrl;
|
|
39
|
+
contentWindow.view = props.view;
|
|
40
|
+
}
|
|
41
|
+
if (doc && doc.body) {
|
|
42
|
+
let h = doc.body.scrollHeight;
|
|
43
|
+
if (h > doc.documentElement.scrollHeight) {
|
|
44
|
+
h = doc.body.scrollHeight;
|
|
45
|
+
}
|
|
46
|
+
iframeHeight.value = h;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
watch(() => props.value, (newVal) => {
|
|
50
|
+
if (!newVal) {
|
|
51
|
+
iframeHeight.value = void 0;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
ns,
|
|
56
|
+
iframeHeight,
|
|
57
|
+
sandbox,
|
|
58
|
+
calcHeight
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
render() {
|
|
62
|
+
return createVNode("div", {
|
|
63
|
+
"class": [this.ns.b()]
|
|
64
|
+
}, [createVNode("iframe", {
|
|
65
|
+
"class": this.ns.e("iframe"),
|
|
66
|
+
"srcdoc": this.value,
|
|
67
|
+
"sandbox": this.sandbox,
|
|
68
|
+
"style": this.iframeHeight ? {
|
|
69
|
+
height: "".concat(this.iframeHeight, "px")
|
|
70
|
+
} : void 0,
|
|
71
|
+
"onLoad": this.calcHeight
|
|
72
|
+
}, null)]);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export { IBizHtmlDocPreview };
|
package/es/common/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import { IBizActionToolbar } from './action-toolbar/action-toolbar.mjs';
|
|
|
4
4
|
import { IBizCol } from './col/col.mjs';
|
|
5
5
|
import { IBizRow } from './row/row.mjs';
|
|
6
6
|
import { IBizRawItem } from './rawitem/rawitem.mjs';
|
|
7
|
+
import { IBizHtmlDocPreview } from './html-doc-preview/html-doc-preview.mjs';
|
|
7
8
|
import { IBizNoData } from './no-data/no-data.mjs';
|
|
8
9
|
import { IBizSplit } from './split/split.mjs';
|
|
9
10
|
import { IBizSplitTrigger } from './split-trigger/split-trigger.mjs';
|
|
@@ -56,6 +57,7 @@ const IBizCommonComponents = {
|
|
|
56
57
|
v.component(IBizViewShell.name, IBizViewShell);
|
|
57
58
|
v.component(IBizControlShell.name, IBizControlShell);
|
|
58
59
|
v.component(IBizRawItem.name, IBizRawItem);
|
|
60
|
+
v.component(IBizHtmlDocPreview.name, IBizHtmlDocPreview);
|
|
59
61
|
v.component(IBizCodeList.name, IBizCodeList);
|
|
60
62
|
v.component(IBizNoData.name, IBizNoData);
|
|
61
63
|
v.component(IBizSplit.name, IBizSplit);
|
|
@@ -29,6 +29,10 @@ const IBizRawItem = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
type: String,
|
|
30
30
|
required: false
|
|
31
31
|
},
|
|
32
|
+
enableHtmlDoc: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
32
36
|
ctrl: {
|
|
33
37
|
type: Object,
|
|
34
38
|
required: false
|
|
@@ -303,6 +307,15 @@ const IBizRawItem = /* @__PURE__ */ defineComponent({
|
|
|
303
307
|
}, [this.rawItemText]);
|
|
304
308
|
}
|
|
305
309
|
if (this.rawItemType === "HTML") {
|
|
310
|
+
if (this.enableHtmlDoc) {
|
|
311
|
+
return createVNode(resolveComponent("iBizHtmlDocPreview"), {
|
|
312
|
+
"class": [this.ns.e("paragraph"), this.semantic.html.class],
|
|
313
|
+
"style": this.semantic.html.style,
|
|
314
|
+
"value": this.rawItemText,
|
|
315
|
+
"view": this.view,
|
|
316
|
+
"ctrl": this.ctrl
|
|
317
|
+
}, null);
|
|
318
|
+
}
|
|
306
319
|
return createVNode("div", {
|
|
307
320
|
"class": [this.ns.e("paragraph"), this.semantic.html.class],
|
|
308
321
|
"style": this.semantic.html.style,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, defineComponent, createVNode, resolveComponent, ref, computed, watch } from 'vue';
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent, mergeProps, ref, computed, watch } from 'vue';
|
|
2
2
|
import { useNamespace, useSemanticNode } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { FormRawItemController } from '@ibiz-template/runtime';
|
|
4
4
|
import './form-rawitem.css';
|
|
@@ -17,6 +17,10 @@ const FormRawItem = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
controller: {
|
|
18
18
|
type: FormRawItemController,
|
|
19
19
|
required: true
|
|
20
|
+
},
|
|
21
|
+
attrs: {
|
|
22
|
+
type: Object,
|
|
23
|
+
required: false
|
|
20
24
|
}
|
|
21
25
|
},
|
|
22
26
|
setup(props) {
|
|
@@ -209,7 +213,7 @@ const FormRawItem = /* @__PURE__ */ defineComponent({
|
|
|
209
213
|
"class": this.ns.b("preview-content")
|
|
210
214
|
}, [this.renderPreviewContent()])]);
|
|
211
215
|
}
|
|
212
|
-
return createVNode(resolveComponent("iBizRawItem"), {
|
|
216
|
+
return createVNode(resolveComponent("iBizRawItem"), mergeProps({
|
|
213
217
|
"class": [
|
|
214
218
|
this.ns.b(),
|
|
215
219
|
this.semanticClass("rawitem", {
|
|
@@ -225,8 +229,10 @@ const FormRawItem = /* @__PURE__ */ defineComponent({
|
|
|
225
229
|
}),
|
|
226
230
|
"rawItem": this.modelData,
|
|
227
231
|
"content": this.content,
|
|
232
|
+
"ctrl": this.controller.form,
|
|
233
|
+
"view": this.controller.form.view,
|
|
228
234
|
"onClick": (event) => this.controller.onClick(event)
|
|
229
|
-
}, null);
|
|
235
|
+
}, this.attrs), null);
|
|
230
236
|
}
|
|
231
237
|
});
|
|
232
238
|
|
|
@@ -82,7 +82,8 @@ const IBizEmbedAIChat = /* @__PURE__ */ defineComponent({
|
|
|
82
82
|
mode: editorParams.srfaimode || "TOPIC",
|
|
83
83
|
resourceOptions,
|
|
84
84
|
containerOptions: {
|
|
85
|
-
container: aiChatElementRef.value
|
|
85
|
+
container: aiChatElementRef.value,
|
|
86
|
+
compWrapperId: editorParams.compwrapperid || "DEFAULT"
|
|
86
87
|
},
|
|
87
88
|
topicOptions: {
|
|
88
89
|
appid: ibiz.env.appId,
|
|
@@ -21,6 +21,7 @@ const IBizRaw = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
});
|
|
22
22
|
const chunkView = c.editorParams.chunkview;
|
|
23
23
|
const chunkEntity = c.editorParams.chunkentity;
|
|
24
|
+
const enableHtmlDoc = c.toBoolean(c.editorParams.enablehtmldoc);
|
|
24
25
|
let type = "TEXT";
|
|
25
26
|
let template = "";
|
|
26
27
|
if (editorModel.contentType) {
|
|
@@ -79,6 +80,7 @@ const IBizRaw = /* @__PURE__ */ defineComponent({
|
|
|
79
80
|
template,
|
|
80
81
|
chunkView,
|
|
81
82
|
chunkEntity,
|
|
83
|
+
enableHtmlDoc,
|
|
82
84
|
enableOverFlow,
|
|
83
85
|
semanticClass,
|
|
84
86
|
semanticStyle,
|
|
@@ -95,6 +97,7 @@ const IBizRaw = /* @__PURE__ */ defineComponent({
|
|
|
95
97
|
"content": this.content,
|
|
96
98
|
"chunkView": this.chunkView,
|
|
97
99
|
"chunkEntity": this.chunkEntity,
|
|
100
|
+
"enableHtmlDoc": this.enableHtmlDoc,
|
|
98
101
|
"context": this.controller.context,
|
|
99
102
|
"ctrl": this.controller.ctrl,
|
|
100
103
|
"view": this.controller.view,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBizPanelCtrlViewPageCaption, IBizPanelContainer, IBizPanelCtrlPos, IBizScrollContainer, IBizNavPos, IBizSingleDataContainer, IBizMultiDataContainer, IBizMultiDataContainerRaw, IBizPanelField, IBizPanelRawItem, IBizGridContainer, IBizPanelTabPage, IBizPanelContainerImage, IBizPanelItemRender, IBizTeleportPlaceholder, IBizPanelContainerTabs, IBizAuthWxmpQrcode } from '@ibiz-template/vue3-util';
|
|
1
|
+
import { IBizPanelCtrlViewPageCaption, IBizPanelContainer, IBizPanelCtrlPos, IBizScrollContainer, IBizNavPos, IBizSingleDataContainer, IBizMultiDataContainer, IBizMultiDataContainerRaw, IBizPanelField, IBizPanelRawItem, IBizGridContainer, IBizPanelTabPage, IBizPanelContainerImage, IBizPanelItemRender, IBizPanelSimpleList, IBizTeleportPlaceholder, IBizPanelContainerTabs, IBizAuthWxmpQrcode } from '@ibiz-template/vue3-util';
|
|
2
2
|
import { IBizAuthUserinfo } from './auth-userinfo/index.mjs';
|
|
3
3
|
import { IBizNavPosIndex } from './nav-pos-index/index.mjs';
|
|
4
4
|
import { IBizNavTabs } from './nav-tabs/index.mjs';
|
|
@@ -114,6 +114,7 @@ const IBizPanelComponents = {
|
|
|
114
114
|
v.use(IBizPanelContainerImage);
|
|
115
115
|
v.use(IBizSearchFormButtons);
|
|
116
116
|
v.use(IBizPanelItemRender);
|
|
117
|
+
v.use(IBizPanelSimpleList);
|
|
117
118
|
v.use(IBizViewMessage);
|
|
118
119
|
v.use(IBizPanelStaticCarousel);
|
|
119
120
|
v.use(IBizTeleportPlaceholder);
|
|
@@ -55,6 +55,11 @@ class AIChatUtil {
|
|
|
55
55
|
ibiz.log.error(error);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
+
if (editorParams.compwrapperid) {
|
|
59
|
+
containerOptions.compWrapperId = editorParams.compwrapperid;
|
|
60
|
+
} else {
|
|
61
|
+
containerOptions.compWrapperId = "DEFAULT";
|
|
62
|
+
}
|
|
58
63
|
const topicOptions = {};
|
|
59
64
|
topicOptions.captionMode = ibiz.config.common.aiChatTopicCaptionMode;
|
|
60
65
|
if (editorParams.topiccaptionmode) {
|
|
@@ -192,6 +197,13 @@ class AIChatUtil {
|
|
|
192
197
|
} else {
|
|
193
198
|
chatOptions.placeholder = ibiz.config.common.aiInputPlaceholder;
|
|
194
199
|
}
|
|
200
|
+
if (editorParams.srfaichatmessagepagesize) {
|
|
201
|
+
chatOptions.chatMessagePageSize = Number(
|
|
202
|
+
editorParams.srfaichatmessagepagesize
|
|
203
|
+
);
|
|
204
|
+
} else {
|
|
205
|
+
chatOptions.chatMessagePageSize = ibiz.config.common.aiChatMessagePageSize;
|
|
206
|
+
}
|
|
195
207
|
chatOptions.fetchAgentList = (args2 = {}) => {
|
|
196
208
|
const { query, agentid } = args2;
|
|
197
209
|
return this.getAIAgentList(
|
|
@@ -662,6 +674,12 @@ class AIChatUtil {
|
|
|
662
674
|
ibiz.log.error(error);
|
|
663
675
|
}
|
|
664
676
|
}
|
|
677
|
+
if (params.hasOwnProperty("compwrapperid")) {
|
|
678
|
+
containerOptions.compWrapperId = params.compwrapperid;
|
|
679
|
+
delete params.compwrapperid;
|
|
680
|
+
} else {
|
|
681
|
+
containerOptions.compWrapperId = "DEFAULT";
|
|
682
|
+
}
|
|
665
683
|
const topicOptions = {};
|
|
666
684
|
if (params.hasOwnProperty("topiccaptionmode")) {
|
|
667
685
|
topicOptions.captionMode = params.topiccaptionmode;
|
|
@@ -833,6 +851,12 @@ class AIChatUtil {
|
|
|
833
851
|
} else {
|
|
834
852
|
chatOptions.placeholder = ibiz.config.common.aiInputPlaceholder;
|
|
835
853
|
}
|
|
854
|
+
if (params.hasOwnProperty("srfaichatmessagepagesize")) {
|
|
855
|
+
chatOptions.chatMessagePageSize = Number(params.srfaichatmessagepagesize);
|
|
856
|
+
delete params.srfaichatmessagepagesize;
|
|
857
|
+
} else {
|
|
858
|
+
chatOptions.chatMessagePageSize = ibiz.config.common.aiChatMessagePageSize;
|
|
859
|
+
}
|
|
836
860
|
chatOptions.fetchAgentList = (args2 = {}) => {
|
|
837
861
|
const { query, agentid } = args2;
|
|
838
862
|
return this.getAIAgentList(context, {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SysUIActionTag } from '@ibiz-template/runtime';
|
|
1
|
+
import { getControlsByView, SysUIActionTag } from '@ibiz-template/runtime';
|
|
3
2
|
import { PickupViewEngine } from './pickup-view.engine.mjs';
|
|
4
3
|
|
|
5
4
|
"use strict";
|
|
@@ -28,7 +27,12 @@ class MPickupViewEngine extends PickupViewEngine {
|
|
|
28
27
|
* @memberof MPickupViewEngine
|
|
29
28
|
*/
|
|
30
29
|
get simpleList() {
|
|
31
|
-
|
|
30
|
+
var _a;
|
|
31
|
+
const list = this.view.getController("simplelist");
|
|
32
|
+
if (list) {
|
|
33
|
+
return list;
|
|
34
|
+
}
|
|
35
|
+
return (_a = this.view.layoutPanel) == null ? void 0 : _a.panelItems.simplelist;
|
|
32
36
|
}
|
|
33
37
|
/**
|
|
34
38
|
* 视图created生命周期执行逻辑
|
|
@@ -40,23 +44,23 @@ class MPickupViewEngine extends PickupViewEngine {
|
|
|
40
44
|
*/
|
|
41
45
|
async onCreated() {
|
|
42
46
|
await super.onCreated();
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
const controls = getControlsByView(this.view.model);
|
|
48
|
+
const simpleListControl = controls.find(
|
|
49
|
+
(control) => control.name === "simplelist"
|
|
50
|
+
);
|
|
51
|
+
if (simpleListControl) {
|
|
52
|
+
const { childNames } = this.view;
|
|
53
|
+
childNames.push("simplelist");
|
|
54
|
+
if (!this.view.slotProps.simplelist) {
|
|
55
|
+
this.view.slotProps.simplelist = {};
|
|
56
|
+
}
|
|
57
|
+
this.view.slotProps.simplelist.mdctrlActiveMode = 2;
|
|
58
|
+
this.view.slotProps.simplelist.isSimple = true;
|
|
59
|
+
this.view.slotProps.simplelist.singleSelect = false;
|
|
53
60
|
}
|
|
54
61
|
if (!this.view.slotProps.pickupviewpanel) {
|
|
55
62
|
this.view.slotProps.pickupviewpanel = {};
|
|
56
63
|
}
|
|
57
|
-
this.view.slotProps.simplelist.mdctrlActiveMode = 2;
|
|
58
|
-
this.view.slotProps.simplelist.isSimple = true;
|
|
59
|
-
this.view.slotProps.simplelist.singleSelect = false;
|
|
60
64
|
this.view.slotProps.pickupviewpanel.singleSelect = false;
|
|
61
65
|
if (this.view.params.checkstrictly) {
|
|
62
66
|
this.checkStrictly = this.view.params.checkstrictly === "true" || this.view.params.checkstrictly === true;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./html-doc-preview.css');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizHtmlDocPreview = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizHtmlDocPreview",
|
|
10
|
+
props: {
|
|
11
|
+
// html值,完整HTML文档内容
|
|
12
|
+
value: String,
|
|
13
|
+
enableScript: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: true
|
|
16
|
+
},
|
|
17
|
+
ctrl: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: false
|
|
20
|
+
},
|
|
21
|
+
view: {
|
|
22
|
+
type: Object,
|
|
23
|
+
required: false
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setup(props) {
|
|
27
|
+
const ns = vue3Util.useNamespace("html-doc-preview");
|
|
28
|
+
const iframeHeight = vue.ref();
|
|
29
|
+
const sandbox = vue.computed(() => {
|
|
30
|
+
if (props.enableScript) {
|
|
31
|
+
return "allow-same-origin allow-scripts";
|
|
32
|
+
}
|
|
33
|
+
return "allow-same-origin";
|
|
34
|
+
});
|
|
35
|
+
const calcHeight = (e) => {
|
|
36
|
+
const iframe = e.target;
|
|
37
|
+
const doc = iframe.contentDocument;
|
|
38
|
+
const contentWindow = iframe.contentWindow;
|
|
39
|
+
if (contentWindow) {
|
|
40
|
+
contentWindow.ctrl = props.ctrl;
|
|
41
|
+
contentWindow.view = props.view;
|
|
42
|
+
}
|
|
43
|
+
if (doc && doc.body) {
|
|
44
|
+
let h = doc.body.scrollHeight;
|
|
45
|
+
if (h > doc.documentElement.scrollHeight) {
|
|
46
|
+
h = doc.body.scrollHeight;
|
|
47
|
+
}
|
|
48
|
+
iframeHeight.value = h;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
vue.watch(() => props.value, (newVal) => {
|
|
52
|
+
if (!newVal) {
|
|
53
|
+
iframeHeight.value = void 0;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
ns,
|
|
58
|
+
iframeHeight,
|
|
59
|
+
sandbox,
|
|
60
|
+
calcHeight
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
render() {
|
|
64
|
+
return vue.createVNode("div", {
|
|
65
|
+
"class": [this.ns.b()]
|
|
66
|
+
}, [vue.createVNode("iframe", {
|
|
67
|
+
"class": this.ns.e("iframe"),
|
|
68
|
+
"srcdoc": this.value,
|
|
69
|
+
"sandbox": this.sandbox,
|
|
70
|
+
"style": this.iframeHeight ? {
|
|
71
|
+
height: "".concat(this.iframeHeight, "px")
|
|
72
|
+
} : void 0,
|
|
73
|
+
"onLoad": this.calcHeight
|
|
74
|
+
}, null)]);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
exports.IBizHtmlDocPreview = IBizHtmlDocPreview;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-html-doc-preview{width:100%}.ibiz-html-doc-preview__iframe{display:block;width:100%;border:none}
|
package/lib/common/index.cjs
CHANGED
|
@@ -8,6 +8,7 @@ var actionToolbar = require('./action-toolbar/action-toolbar.cjs');
|
|
|
8
8
|
var col = require('./col/col.cjs');
|
|
9
9
|
var row = require('./row/row.cjs');
|
|
10
10
|
var rawitem = require('./rawitem/rawitem.cjs');
|
|
11
|
+
var htmlDocPreview = require('./html-doc-preview/html-doc-preview.cjs');
|
|
11
12
|
var noData = require('./no-data/no-data.cjs');
|
|
12
13
|
var split = require('./split/split.cjs');
|
|
13
14
|
var splitTrigger = require('./split-trigger/split-trigger.cjs');
|
|
@@ -60,6 +61,7 @@ const IBizCommonComponents = {
|
|
|
60
61
|
v.component(vue3Util.IBizViewShell.name, vue3Util.IBizViewShell);
|
|
61
62
|
v.component(vue3Util.IBizControlShell.name, vue3Util.IBizControlShell);
|
|
62
63
|
v.component(rawitem.IBizRawItem.name, rawitem.IBizRawItem);
|
|
64
|
+
v.component(htmlDocPreview.IBizHtmlDocPreview.name, htmlDocPreview.IBizHtmlDocPreview);
|
|
63
65
|
v.component(vue3Util.IBizCodeList.name, vue3Util.IBizCodeList);
|
|
64
66
|
v.component(noData.IBizNoData.name, noData.IBizNoData);
|
|
65
67
|
v.component(split.IBizSplit.name, split.IBizSplit);
|
|
@@ -31,6 +31,10 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
31
31
|
type: String,
|
|
32
32
|
required: false
|
|
33
33
|
},
|
|
34
|
+
enableHtmlDoc: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
required: false
|
|
37
|
+
},
|
|
34
38
|
ctrl: {
|
|
35
39
|
type: Object,
|
|
36
40
|
required: false
|
|
@@ -305,6 +309,15 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
305
309
|
}, [this.rawItemText]);
|
|
306
310
|
}
|
|
307
311
|
if (this.rawItemType === "HTML") {
|
|
312
|
+
if (this.enableHtmlDoc) {
|
|
313
|
+
return vue.createVNode(vue.resolveComponent("iBizHtmlDocPreview"), {
|
|
314
|
+
"class": [this.ns.e("paragraph"), this.semantic.html.class],
|
|
315
|
+
"style": this.semantic.html.style,
|
|
316
|
+
"value": this.rawItemText,
|
|
317
|
+
"view": this.view,
|
|
318
|
+
"ctrl": this.ctrl
|
|
319
|
+
}, null);
|
|
320
|
+
}
|
|
308
321
|
return vue.createVNode("div", {
|
|
309
322
|
"class": [this.ns.e("paragraph"), this.semantic.html.class],
|
|
310
323
|
"style": this.semantic.html.style,
|
|
@@ -21,6 +21,10 @@ const FormRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
21
21
|
controller: {
|
|
22
22
|
type: runtime.FormRawItemController,
|
|
23
23
|
required: true
|
|
24
|
+
},
|
|
25
|
+
attrs: {
|
|
26
|
+
type: Object,
|
|
27
|
+
required: false
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
setup(props) {
|
|
@@ -213,7 +217,7 @@ const FormRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
213
217
|
"class": this.ns.b("preview-content")
|
|
214
218
|
}, [this.renderPreviewContent()])]);
|
|
215
219
|
}
|
|
216
|
-
return vue.createVNode(vue.resolveComponent("iBizRawItem"), {
|
|
220
|
+
return vue.createVNode(vue.resolveComponent("iBizRawItem"), vue.mergeProps({
|
|
217
221
|
"class": [
|
|
218
222
|
this.ns.b(),
|
|
219
223
|
this.semanticClass("rawitem", {
|
|
@@ -229,8 +233,10 @@ const FormRawItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
229
233
|
}),
|
|
230
234
|
"rawItem": this.modelData,
|
|
231
235
|
"content": this.content,
|
|
236
|
+
"ctrl": this.controller.form,
|
|
237
|
+
"view": this.controller.form.view,
|
|
232
238
|
"onClick": (event) => this.controller.onClick(event)
|
|
233
|
-
}, null);
|
|
239
|
+
}, this.attrs), null);
|
|
234
240
|
}
|
|
235
241
|
});
|
|
236
242
|
|
|
@@ -84,7 +84,8 @@ const IBizEmbedAIChat = /* @__PURE__ */ vue.defineComponent({
|
|
|
84
84
|
mode: editorParams.srfaimode || "TOPIC",
|
|
85
85
|
resourceOptions,
|
|
86
86
|
containerOptions: {
|
|
87
|
-
container: aiChatElementRef.value
|
|
87
|
+
container: aiChatElementRef.value,
|
|
88
|
+
compWrapperId: editorParams.compwrapperid || "DEFAULT"
|
|
88
89
|
},
|
|
89
90
|
topicOptions: {
|
|
90
91
|
appid: ibiz.env.appId,
|
|
@@ -23,6 +23,7 @@ const IBizRaw = /* @__PURE__ */ vue.defineComponent({
|
|
|
23
23
|
});
|
|
24
24
|
const chunkView = c.editorParams.chunkview;
|
|
25
25
|
const chunkEntity = c.editorParams.chunkentity;
|
|
26
|
+
const enableHtmlDoc = c.toBoolean(c.editorParams.enablehtmldoc);
|
|
26
27
|
let type = "TEXT";
|
|
27
28
|
let template = "";
|
|
28
29
|
if (editorModel.contentType) {
|
|
@@ -81,6 +82,7 @@ const IBizRaw = /* @__PURE__ */ vue.defineComponent({
|
|
|
81
82
|
template,
|
|
82
83
|
chunkView,
|
|
83
84
|
chunkEntity,
|
|
85
|
+
enableHtmlDoc,
|
|
84
86
|
enableOverFlow,
|
|
85
87
|
semanticClass,
|
|
86
88
|
semanticStyle,
|
|
@@ -97,6 +99,7 @@ const IBizRaw = /* @__PURE__ */ vue.defineComponent({
|
|
|
97
99
|
"content": this.content,
|
|
98
100
|
"chunkView": this.chunkView,
|
|
99
101
|
"chunkEntity": this.chunkEntity,
|
|
102
|
+
"enableHtmlDoc": this.enableHtmlDoc,
|
|
100
103
|
"context": this.controller.context,
|
|
101
104
|
"ctrl": this.controller.ctrl,
|
|
102
105
|
"view": this.controller.view,
|
|
@@ -118,6 +118,7 @@ const IBizPanelComponents = {
|
|
|
118
118
|
v.use(vue3Util.IBizPanelContainerImage);
|
|
119
119
|
v.use(index$m.IBizSearchFormButtons);
|
|
120
120
|
v.use(vue3Util.IBizPanelItemRender);
|
|
121
|
+
v.use(vue3Util.IBizPanelSimpleList);
|
|
121
122
|
v.use(index$n.IBizViewMessage);
|
|
122
123
|
v.use(index$o.IBizPanelStaticCarousel);
|
|
123
124
|
v.use(vue3Util.IBizTeleportPlaceholder);
|
|
@@ -57,6 +57,11 @@ class AIChatUtil {
|
|
|
57
57
|
ibiz.log.error(error);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
+
if (editorParams.compwrapperid) {
|
|
61
|
+
containerOptions.compWrapperId = editorParams.compwrapperid;
|
|
62
|
+
} else {
|
|
63
|
+
containerOptions.compWrapperId = "DEFAULT";
|
|
64
|
+
}
|
|
60
65
|
const topicOptions = {};
|
|
61
66
|
topicOptions.captionMode = ibiz.config.common.aiChatTopicCaptionMode;
|
|
62
67
|
if (editorParams.topiccaptionmode) {
|
|
@@ -194,6 +199,13 @@ class AIChatUtil {
|
|
|
194
199
|
} else {
|
|
195
200
|
chatOptions.placeholder = ibiz.config.common.aiInputPlaceholder;
|
|
196
201
|
}
|
|
202
|
+
if (editorParams.srfaichatmessagepagesize) {
|
|
203
|
+
chatOptions.chatMessagePageSize = Number(
|
|
204
|
+
editorParams.srfaichatmessagepagesize
|
|
205
|
+
);
|
|
206
|
+
} else {
|
|
207
|
+
chatOptions.chatMessagePageSize = ibiz.config.common.aiChatMessagePageSize;
|
|
208
|
+
}
|
|
197
209
|
chatOptions.fetchAgentList = (args2 = {}) => {
|
|
198
210
|
const { query, agentid } = args2;
|
|
199
211
|
return this.getAIAgentList(
|
|
@@ -664,6 +676,12 @@ class AIChatUtil {
|
|
|
664
676
|
ibiz.log.error(error);
|
|
665
677
|
}
|
|
666
678
|
}
|
|
679
|
+
if (params.hasOwnProperty("compwrapperid")) {
|
|
680
|
+
containerOptions.compWrapperId = params.compwrapperid;
|
|
681
|
+
delete params.compwrapperid;
|
|
682
|
+
} else {
|
|
683
|
+
containerOptions.compWrapperId = "DEFAULT";
|
|
684
|
+
}
|
|
667
685
|
const topicOptions = {};
|
|
668
686
|
if (params.hasOwnProperty("topiccaptionmode")) {
|
|
669
687
|
topicOptions.captionMode = params.topiccaptionmode;
|
|
@@ -835,6 +853,12 @@ class AIChatUtil {
|
|
|
835
853
|
} else {
|
|
836
854
|
chatOptions.placeholder = ibiz.config.common.aiInputPlaceholder;
|
|
837
855
|
}
|
|
856
|
+
if (params.hasOwnProperty("srfaichatmessagepagesize")) {
|
|
857
|
+
chatOptions.chatMessagePageSize = Number(params.srfaichatmessagepagesize);
|
|
858
|
+
delete params.srfaichatmessagepagesize;
|
|
859
|
+
} else {
|
|
860
|
+
chatOptions.chatMessagePageSize = ibiz.config.common.aiChatMessagePageSize;
|
|
861
|
+
}
|
|
838
862
|
chatOptions.fetchAgentList = (args2 = {}) => {
|
|
839
863
|
const { query, agentid } = args2;
|
|
840
864
|
return this.getAIAgentList(context, {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var core = require('@ibiz-template/core');
|
|
4
3
|
var runtime = require('@ibiz-template/runtime');
|
|
5
4
|
var pickupView_engine = require('./pickup-view.engine.cjs');
|
|
6
5
|
|
|
@@ -30,7 +29,12 @@ class MPickupViewEngine extends pickupView_engine.PickupViewEngine {
|
|
|
30
29
|
* @memberof MPickupViewEngine
|
|
31
30
|
*/
|
|
32
31
|
get simpleList() {
|
|
33
|
-
|
|
32
|
+
var _a;
|
|
33
|
+
const list = this.view.getController("simplelist");
|
|
34
|
+
if (list) {
|
|
35
|
+
return list;
|
|
36
|
+
}
|
|
37
|
+
return (_a = this.view.layoutPanel) == null ? void 0 : _a.panelItems.simplelist;
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
40
|
* 视图created生命周期执行逻辑
|
|
@@ -42,23 +46,23 @@ class MPickupViewEngine extends pickupView_engine.PickupViewEngine {
|
|
|
42
46
|
*/
|
|
43
47
|
async onCreated() {
|
|
44
48
|
await super.onCreated();
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
const controls = runtime.getControlsByView(this.view.model);
|
|
50
|
+
const simpleListControl = controls.find(
|
|
51
|
+
(control) => control.name === "simplelist"
|
|
52
|
+
);
|
|
53
|
+
if (simpleListControl) {
|
|
54
|
+
const { childNames } = this.view;
|
|
55
|
+
childNames.push("simplelist");
|
|
56
|
+
if (!this.view.slotProps.simplelist) {
|
|
57
|
+
this.view.slotProps.simplelist = {};
|
|
58
|
+
}
|
|
59
|
+
this.view.slotProps.simplelist.mdctrlActiveMode = 2;
|
|
60
|
+
this.view.slotProps.simplelist.isSimple = true;
|
|
61
|
+
this.view.slotProps.simplelist.singleSelect = false;
|
|
55
62
|
}
|
|
56
63
|
if (!this.view.slotProps.pickupviewpanel) {
|
|
57
64
|
this.view.slotProps.pickupviewpanel = {};
|
|
58
65
|
}
|
|
59
|
-
this.view.slotProps.simplelist.mdctrlActiveMode = 2;
|
|
60
|
-
this.view.slotProps.simplelist.isSimple = true;
|
|
61
|
-
this.view.slotProps.simplelist.singleSelect = false;
|
|
62
66
|
this.view.slotProps.pickupviewpanel.singleSelect = false;
|
|
63
67
|
if (this.view.params.checkstrictly) {
|
|
64
68
|
this.checkStrictly = this.view.params.checkstrictly === "true" || this.view.params.checkstrictly === true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.142",
|
|
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.
|
|
34
|
+
"@ibiz-template-plugin/ai-chat": "^0.0.109",
|
|
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.140",
|
|
39
39
|
"@ibiz-template/devtool": "0.0.17",
|
|
40
|
-
"@ibiz-template/model-helper": "0.7.41-alpha.
|
|
41
|
-
"@ibiz-template/runtime": "0.7.41-alpha.
|
|
40
|
+
"@ibiz-template/model-helper": "0.7.41-alpha.146",
|
|
41
|
+
"@ibiz-template/runtime": "0.7.41-alpha.146",
|
|
42
42
|
"@ibiz-template/theme": "0.7.39",
|
|
43
|
-
"@ibiz-template/vue3-util": "0.7.41-alpha.
|
|
43
|
+
"@ibiz-template/vue3-util": "0.7.41-alpha.146",
|
|
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",
|