@ibiz-template/vue3-components 0.7.41-alpha.20 → 0.7.41-alpha.22
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-Bd4vTqbM.js +1 -0
- package/dist/{index-K6B-Odyq.js → index-mjpFeLkH.js} +1 -1
- package/dist/{index-Bt6TkADL.js → index-pz3nYBld.js} +1 -1
- package/dist/index-zV2qOpaC.js +11 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-Xio5lpNl.js +1 -0
- package/dist/{xlsx-util-mN5WSU7v.js → xlsx-util-8tqSNsIL.js} +1 -1
- package/es/common/action-toolbar/action-toolbar.css +1 -1
- package/es/common/action-toolbar/action-toolbar.d.ts +1 -1
- package/es/common/action-toolbar/action-toolbar.mjs +49 -7
- package/es/common/index.mjs +2 -1
- package/es/control/dashboard/dashboard.d.ts +2 -2
- package/es/control/dashboard/dashboard.mjs +3 -2
- package/es/control/dashboard/portlet/actionbar-portlet/actionbar-portlet.d.ts +1 -0
- package/es/control/dashboard/portlet/actionbar-portlet/actionbar-portlet.mjs +3 -0
- package/es/control/dashboard/portlet/actionbar-portlet/index.d.ts +1 -0
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.d.ts +4 -3
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +6 -3
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.mjs +4 -1
- package/es/control/form/edit-form/edit-form.mjs +10 -1
- package/es/control/form/form/form.d.ts +1 -1
- package/es/control/form/form/form.mjs +2 -1
- package/es/control/form/form-detail/form-group-panel/form-group-panel.d.ts +1 -0
- package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +3 -0
- package/es/control/form/form-detail/form-group-panel/index.d.ts +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.mjs +3 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.d.ts +2 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.mjs +4 -1
- package/es/control/form/form-detail/form-mdctrl/index.d.ts +2 -1
- package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.mjs +2 -2
- package/es/control/grid/grid/grid.mjs +3 -7
- package/es/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.mjs +4 -3
- package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.d.ts +4 -0
- package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.mjs +30 -3
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +1 -1
- package/es/control/kanban/kanban.css +1 -1
- package/es/control/kanban/kanban.mjs +11 -6
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -1
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.mjs +3 -0
- package/es/control/list/list.d.ts +1 -1
- package/es/control/list/list.mjs +4 -1
- package/es/control/search-bar/index.d.ts +1 -0
- package/es/control/search-bar/search-bar.css +1 -1
- package/es/control/search-bar/search-bar.d.ts +3 -2
- package/es/control/search-bar/search-bar.mjs +26 -3
- package/es/control/search-bar/search-groups/search-groups.css +1 -1
- package/es/control/search-bar/search-groups/search-groups.d.ts +11 -1
- package/es/control/search-bar/search-groups/search-groups.mjs +14 -1
- package/es/control/toolbar/index.d.ts +3 -3
- package/es/control/toolbar/toolbar.d.ts +5 -5
- package/es/control/toolbar/toolbar.mjs +1 -1
- package/es/control/tree-grid/tree-grid.mjs +2 -1
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/index.d.ts +5 -4
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.d.ts +5 -4
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.mjs +8 -5
- package/es/control/tree-grid-ex/tree-grid-ex.d.ts +1 -1
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +3 -2
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.mjs +2 -2
- package/es/editor/code/monaco-editor/monaco-editor.mjs +7 -3
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.d.ts +1 -1
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +4 -1
- package/es/editor/html/wang-editor/wang-editor.d.ts +2 -0
- package/es/editor/html/wang-editor/wang-editor.mjs +10 -6
- package/es/editor/index.mjs +6 -0
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.d.ts +2 -0
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +2 -2
- package/es/editor/text-box/index.d.ts +1 -0
- package/es/editor/text-box/index.mjs +1 -0
- package/es/editor/text-box/input/input.mjs +7 -3
- package/es/editor/text-box/signature/signature.css +1 -0
- package/es/editor/text-box/signature/signature.d.ts +102 -0
- package/es/editor/text-box/signature/signature.mjs +238 -0
- package/es/editor/text-box/text-box-editor.provider.mjs +4 -0
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +2 -0
- package/es/editor/upload/ibiz-image-cropping/ibiz-image-cropping.d.ts +2 -0
- package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +2 -0
- package/es/editor/upload/use/use-iview-upload.mjs +12 -3
- package/es/locale/en/index.d.ts +7 -0
- package/es/locale/en/index.mjs +7 -0
- package/es/locale/zh-CN/index.d.ts +7 -0
- package/es/locale/zh-CN/index.mjs +7 -0
- package/es/panel-component/panel-static-carousel/panel-static-carousel.d.ts +1 -1
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.mjs +1 -1
- package/es/util/app-util/app-util.mjs +7 -7
- package/es/util/open-view-util/open-view-util.mjs +1 -1
- package/es/view-engine/gantt-view.engine.mjs +4 -0
- package/lib/common/action-toolbar/action-toolbar.cjs +49 -7
- package/lib/common/action-toolbar/action-toolbar.css +1 -1
- package/lib/common/index.cjs +1 -0
- package/lib/control/dashboard/dashboard.cjs +2 -1
- package/lib/control/dashboard/portlet/actionbar-portlet/actionbar-portlet.cjs +3 -0
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +6 -3
- package/lib/control/data-view/data-view.cjs +3 -0
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/form/edit-form/edit-form.cjs +10 -1
- package/lib/control/form/form/form.cjs +1 -0
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +3 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.cjs +3 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.cjs +4 -1
- package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.cjs +2 -2
- package/lib/control/grid/grid/grid.cjs +2 -6
- package/lib/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.cjs +4 -3
- package/lib/control/grid/grid-column/grid-field-column/attachment-column/file-util.cjs +30 -3
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +1 -1
- package/lib/control/kanban/kanban.cjs +10 -5
- package/lib/control/kanban/kanban.css +1 -1
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.cjs +3 -0
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -1
- package/lib/control/list/list.cjs +3 -0
- package/lib/control/search-bar/search-bar.cjs +25 -2
- package/lib/control/search-bar/search-bar.css +1 -1
- package/lib/control/search-bar/search-groups/search-groups.cjs +14 -1
- package/lib/control/search-bar/search-groups/search-groups.css +1 -1
- package/lib/control/toolbar/toolbar.cjs +1 -1
- package/lib/control/tree-grid/tree-grid.cjs +1 -0
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.cjs +8 -5
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +2 -1
- package/lib/editor/carousel/ibiz-carousel/ibiz-carousel.cjs +2 -2
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +7 -3
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +4 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +10 -6
- package/lib/editor/index.cjs +6 -0
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +2 -2
- package/lib/editor/text-box/index.cjs +2 -0
- package/lib/editor/text-box/input/input.cjs +7 -3
- package/lib/editor/text-box/signature/signature.cjs +240 -0
- package/lib/editor/text-box/signature/signature.css +1 -0
- package/lib/editor/text-box/text-box-editor.provider.cjs +4 -0
- package/lib/editor/upload/use/use-iview-upload.cjs +12 -3
- package/lib/locale/en/index.cjs +7 -0
- package/lib/locale/zh-CN/index.cjs +7 -0
- package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.cjs +1 -1
- package/lib/util/app-util/app-util.cjs +7 -7
- package/lib/util/open-view-util/open-view-util.cjs +1 -1
- package/lib/view-engine/gantt-view.engine.cjs +4 -0
- package/package.json +7 -7
- package/dist/ibiz-markdown-editor-e33m6ees.js +0 -1
- package/dist/index-hzGAQk1t.js +0 -11
- package/dist/wang-editor-qbGW8Rzj.js +0 -1
|
@@ -204,7 +204,7 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
204
204
|
footerToolbarItems,
|
|
205
205
|
questionToolbarItems,
|
|
206
206
|
otherToolbarItems,
|
|
207
|
-
question: async (aiChat, ctx, param, other, arr) => {
|
|
207
|
+
question: async (aiChat, ctx, param, other, arr, sessionid) => {
|
|
208
208
|
id = qxUtil.createUUID();
|
|
209
209
|
abortController = new AbortController();
|
|
210
210
|
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
@@ -240,7 +240,8 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
}, abortController, ctx, param, {
|
|
243
|
-
messages: arr
|
|
243
|
+
messages: arr,
|
|
244
|
+
sessionid
|
|
244
245
|
});
|
|
245
246
|
} catch (error) {
|
|
246
247
|
aiChat.replaceMessage({
|
|
@@ -275,7 +276,10 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
275
276
|
history: async (ctx, param, other) => {
|
|
276
277
|
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
277
278
|
const historyData = other.appendCurData ? other.appendCurData : {};
|
|
278
|
-
const result = await deService.aiChatHistory(ctx, param,
|
|
279
|
+
const result = await deService.aiChatHistory(ctx, param, {
|
|
280
|
+
historyData,
|
|
281
|
+
sessionid: other.sessionid
|
|
282
|
+
});
|
|
279
283
|
if (result.data && Array.isArray(result.data)) {
|
|
280
284
|
let preMsg;
|
|
281
285
|
result.data.forEach((item) => {
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
var core = require('@ibiz-template/core');
|
|
6
|
+
require('./signature.css');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
const IBizSignature = /* @__PURE__ */ vue.defineComponent({
|
|
10
|
+
name: "IBizSignature",
|
|
11
|
+
props: vue3Util.getInputProps(),
|
|
12
|
+
emits: vue3Util.getEditorEmits(),
|
|
13
|
+
setup(props, {
|
|
14
|
+
emit
|
|
15
|
+
}) {
|
|
16
|
+
const ns = vue3Util.useNamespace("signature");
|
|
17
|
+
const c = props.controller;
|
|
18
|
+
const editorModel = c.model;
|
|
19
|
+
const headers = vue.ref({
|
|
20
|
+
["".concat(ibiz.env.tokenHeader, "Authorization")]: "".concat(ibiz.env.tokenPrefix, "Bearer ").concat(core.getAppCookie(core.CoreConst.TOKEN))
|
|
21
|
+
});
|
|
22
|
+
const uploadUrl = vue.ref("");
|
|
23
|
+
const downloadUrl = vue.ref("");
|
|
24
|
+
const signatureRef = vue.ref();
|
|
25
|
+
const fullScreen = vue.ref(false);
|
|
26
|
+
const currentDataURL = vue.ref("");
|
|
27
|
+
const currentVal = vue.ref("");
|
|
28
|
+
let saveMode = "img";
|
|
29
|
+
let buttons = [{
|
|
30
|
+
label: ibiz.i18n.t("editor.signature.undo"),
|
|
31
|
+
type: "undo"
|
|
32
|
+
}, {
|
|
33
|
+
label: ibiz.i18n.t("editor.signature.rewrite"),
|
|
34
|
+
type: "rewrite"
|
|
35
|
+
}, {
|
|
36
|
+
label: ibiz.i18n.t("editor.signature.confirm"),
|
|
37
|
+
type: "confirm",
|
|
38
|
+
buttonType: "primary"
|
|
39
|
+
}];
|
|
40
|
+
if (editorModel.editorParams) {
|
|
41
|
+
if (editorModel.editorParams.mode) {
|
|
42
|
+
saveMode = editorModel.editorParams.mode;
|
|
43
|
+
}
|
|
44
|
+
if (editorModel.editorParams.buttons) {
|
|
45
|
+
try {
|
|
46
|
+
buttons = JSON.parse(editorModel.editorParams.buttons);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
ibiz.log.error(error);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const showFormDefaultContent = vue.computed(() => {
|
|
53
|
+
if (props.controlParams && props.controlParams.editmode === "hover" && !props.readonly) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
});
|
|
58
|
+
const restCavans = () => {
|
|
59
|
+
var _a;
|
|
60
|
+
(_a = signatureRef.value) == null ? void 0 : _a.updateSignaturePad(() => {
|
|
61
|
+
vue.nextTick(() => {
|
|
62
|
+
var _a2, _b;
|
|
63
|
+
if (currentDataURL.value) {
|
|
64
|
+
(_a2 = signatureRef.value) == null ? void 0 : _a2.signaturePad.fromDataURL(currentDataURL.value);
|
|
65
|
+
} else {
|
|
66
|
+
(_b = signatureRef.value) == null ? void 0 : _b.signaturePad.clear();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const handleCurrentVal = async () => {
|
|
72
|
+
var _a, _b;
|
|
73
|
+
if (currentVal.value) {
|
|
74
|
+
ibiz.loading.showRedirect();
|
|
75
|
+
if (saveMode === "img") {
|
|
76
|
+
currentDataURL.value = currentVal.value;
|
|
77
|
+
} else if (downloadUrl.value) {
|
|
78
|
+
const fileData = JSON.parse(currentVal.value)[0];
|
|
79
|
+
const _url = downloadUrl.value.replace("%fileId%", fileData.id);
|
|
80
|
+
try {
|
|
81
|
+
const editorParams = {
|
|
82
|
+
...c.editorParams
|
|
83
|
+
};
|
|
84
|
+
if (editorParams.exportparams) {
|
|
85
|
+
editorParams.exportParams = JSON.parse(editorParams.exportparams);
|
|
86
|
+
}
|
|
87
|
+
const fileBlob = await ibiz.util.file.requestFile(_url, void 0, {
|
|
88
|
+
context: c.context,
|
|
89
|
+
params: c.params,
|
|
90
|
+
data: props.data,
|
|
91
|
+
file: {
|
|
92
|
+
fileId: fileData.id
|
|
93
|
+
},
|
|
94
|
+
extraParams: editorParams,
|
|
95
|
+
downloadTicketParams: c.downloadTicketParams
|
|
96
|
+
});
|
|
97
|
+
const dataUrl = await ((_a = signatureRef.value) == null ? void 0 : _a.signaturePad.blobToDataURL(fileBlob));
|
|
98
|
+
currentDataURL.value = dataUrl;
|
|
99
|
+
} catch (error) {
|
|
100
|
+
ibiz.log.error(error);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
restCavans();
|
|
104
|
+
(_b = signatureRef.value) == null ? void 0 : _b.signaturePad.loadImage(currentDataURL.value, () => {
|
|
105
|
+
ibiz.loading.hideRedirect();
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
vue.watch(() => props.data, (newVal) => {
|
|
110
|
+
if (newVal) {
|
|
111
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, newVal, c.editorParams);
|
|
112
|
+
uploadUrl.value = urls.uploadUrl;
|
|
113
|
+
downloadUrl.value = urls.downloadUrl;
|
|
114
|
+
}
|
|
115
|
+
}, {
|
|
116
|
+
immediate: true,
|
|
117
|
+
deep: true
|
|
118
|
+
});
|
|
119
|
+
vue.watch(() => props.value, async (newVal, oldVal) => {
|
|
120
|
+
if (newVal !== oldVal) {
|
|
121
|
+
if (!newVal) {
|
|
122
|
+
currentVal.value = "";
|
|
123
|
+
} else {
|
|
124
|
+
currentVal.value = "".concat(newVal || "");
|
|
125
|
+
}
|
|
126
|
+
await handleCurrentVal();
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
immediate: true
|
|
130
|
+
});
|
|
131
|
+
const handleEmit = (_value) => {
|
|
132
|
+
emit("change", _value);
|
|
133
|
+
};
|
|
134
|
+
const getFileType = (dataURL) => {
|
|
135
|
+
const parts = dataURL.split(",");
|
|
136
|
+
const mime = parts[0].split(":")[1].split(";")[0];
|
|
137
|
+
return {
|
|
138
|
+
type: mime
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
const handleUpload = async (dataURL) => {
|
|
142
|
+
const {
|
|
143
|
+
type
|
|
144
|
+
} = getFileType(dataURL);
|
|
145
|
+
const blob = core.base64ToBlob(dataURL);
|
|
146
|
+
const fileName = "signature_".concat(Date.now(), ".png");
|
|
147
|
+
const file = new File([blob], fileName, {
|
|
148
|
+
type
|
|
149
|
+
});
|
|
150
|
+
const fileInfo = await ibiz.util.file.fileUpload(uploadUrl.value, file, headers.value);
|
|
151
|
+
return fileInfo;
|
|
152
|
+
};
|
|
153
|
+
const handleRemove = () => {
|
|
154
|
+
var _a;
|
|
155
|
+
(_a = signatureRef.value) == null ? void 0 : _a.signaturePad.clear();
|
|
156
|
+
currentDataURL.value = "";
|
|
157
|
+
handleEmit(null);
|
|
158
|
+
};
|
|
159
|
+
const handleFileChange = async (dataURL) => {
|
|
160
|
+
const file = await handleUpload(dataURL);
|
|
161
|
+
handleEmit(JSON.stringify([{
|
|
162
|
+
name: file.name,
|
|
163
|
+
id: file.id
|
|
164
|
+
}]));
|
|
165
|
+
};
|
|
166
|
+
const handleConfirm = () => {
|
|
167
|
+
var _a, _b, _c;
|
|
168
|
+
fullScreen.value = false;
|
|
169
|
+
if (!((_a = signatureRef.value) == null ? void 0 : _a.signaturePad.isRedrawn()))
|
|
170
|
+
return;
|
|
171
|
+
if ((_b = signatureRef.value) == null ? void 0 : _b.signaturePad.isEmpty()) {
|
|
172
|
+
handleRemove();
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const dataURL = (_c = signatureRef.value) == null ? void 0 : _c.signaturePad.toDataURL();
|
|
176
|
+
if (dataURL === currentDataURL.value)
|
|
177
|
+
return;
|
|
178
|
+
currentDataURL.value = dataURL;
|
|
179
|
+
switch (saveMode) {
|
|
180
|
+
case "file":
|
|
181
|
+
handleFileChange(dataURL);
|
|
182
|
+
break;
|
|
183
|
+
case "img":
|
|
184
|
+
default:
|
|
185
|
+
handleEmit(dataURL);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const handleButtonClick = (_type) => {
|
|
190
|
+
var _a, _b;
|
|
191
|
+
switch (_type) {
|
|
192
|
+
case "undo":
|
|
193
|
+
(_a = signatureRef.value) == null ? void 0 : _a.signaturePad.undoLastStep();
|
|
194
|
+
break;
|
|
195
|
+
case "rewrite":
|
|
196
|
+
(_b = signatureRef.value) == null ? void 0 : _b.signaturePad.clear();
|
|
197
|
+
break;
|
|
198
|
+
case "confirm":
|
|
199
|
+
handleConfirm();
|
|
200
|
+
break;
|
|
201
|
+
default:
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
return {
|
|
206
|
+
c,
|
|
207
|
+
ns,
|
|
208
|
+
signatureRef,
|
|
209
|
+
fullScreen,
|
|
210
|
+
currentDataURL,
|
|
211
|
+
buttons,
|
|
212
|
+
showFormDefaultContent,
|
|
213
|
+
handleButtonClick
|
|
214
|
+
};
|
|
215
|
+
},
|
|
216
|
+
render() {
|
|
217
|
+
return vue.createVNode("div", {
|
|
218
|
+
"class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.ns.is("show-default", this.showFormDefaultContent)]
|
|
219
|
+
}, [vue.createVNode(vue.resolveComponent("iBizSignaturePad"), {
|
|
220
|
+
"ref": "signatureRef",
|
|
221
|
+
"class": this.ns.e("pad"),
|
|
222
|
+
"options": {
|
|
223
|
+
...this.c.model.editorParams,
|
|
224
|
+
...this.$attrs
|
|
225
|
+
}
|
|
226
|
+
}, null), !this.readonly && vue.createVNode("div", {
|
|
227
|
+
"class": this.ns.e("toolbar")
|
|
228
|
+
}, [this.buttons.map((_btn) => {
|
|
229
|
+
return vue.createVNode(vue.resolveComponent("el-button"), {
|
|
230
|
+
"disabled": this.disabled,
|
|
231
|
+
"type": _btn.buttonType && _btn.buttonType.toLowerCase() || "default",
|
|
232
|
+
"onClick": () => this.handleButtonClick(_btn.type)
|
|
233
|
+
}, {
|
|
234
|
+
default: () => [_btn.label]
|
|
235
|
+
});
|
|
236
|
+
})])]);
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
exports.IBizSignature = IBizSignature;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-signature{--ibiz-signature-min-height:200px;width:100%;height:100%;min-height:var(--ibiz-signature-min-height)}.ibiz-signature__pad .ibiz-signature-pad__container{background-color:var(--ibiz-color-bg-0)}.ibiz-signature__toolbar{display:flex;align-items:center;justify-content:flex-end;width:100%;margin-top:var(--ibiz-spacing-base)}.ibiz-signature--readonly{pointer-events:none}.ibiz-signature--disabled{pointer-events:none}.ibiz-form-item .ibiz-signature.is-show-default:hover .ibiz-signature__toolbar{display:flex}.ibiz-form-item .ibiz-signature.is-show-default .ibiz-signature__toolbar{display:none}
|
|
@@ -21,6 +21,10 @@ class TextBoxEditorProvider {
|
|
|
21
21
|
this.formEditor = "IBizInputIP";
|
|
22
22
|
this.gridEditor = "IBizInputIP";
|
|
23
23
|
}
|
|
24
|
+
if (editorType === "SIGNATURE") {
|
|
25
|
+
this.formEditor = "IBizSignature";
|
|
26
|
+
this.gridEditor = "IBizSignature";
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
29
|
async createController(editorModel, parentController) {
|
|
26
30
|
const c = new textBoxEditor_controller.TextBoxEditorController(editorModel, parentController);
|
|
@@ -102,7 +102,15 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
102
102
|
const downloadUrl = getDownloadUrl(props.data, file);
|
|
103
103
|
file.url = file.url || downloadUrl.replace("%fileId%", file.id);
|
|
104
104
|
if (ibiz.config.common.enableDownloadTicket) {
|
|
105
|
-
ibiz.util.file.getDownloadTicket(
|
|
105
|
+
ibiz.util.file.getDownloadTicket(
|
|
106
|
+
c.context,
|
|
107
|
+
c.params,
|
|
108
|
+
props.data,
|
|
109
|
+
{
|
|
110
|
+
fileId: file.id
|
|
111
|
+
},
|
|
112
|
+
c.downloadTicketParams
|
|
113
|
+
).then((downloadTicket) => {
|
|
106
114
|
if (downloadTicket && downloadTicket.ticket) {
|
|
107
115
|
file.url = downloadUrl.replace(
|
|
108
116
|
"%fileId%",
|
|
@@ -153,7 +161,7 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
153
161
|
if (!response) {
|
|
154
162
|
return;
|
|
155
163
|
}
|
|
156
|
-
if (ibiz.config.common.enableDownloadTicket) {
|
|
164
|
+
if (ibiz.config.common.enableDownloadTicket && response.ticket) {
|
|
157
165
|
ibiz.util.file.setDownloadTicket(response.id, response.ticket);
|
|
158
166
|
}
|
|
159
167
|
uploadCache.cacheFiles.push({
|
|
@@ -203,7 +211,8 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
203
211
|
params: c.params,
|
|
204
212
|
data: props.data,
|
|
205
213
|
file: { fileId: file.id, ...file },
|
|
206
|
-
extraParams: editorParams
|
|
214
|
+
extraParams: editorParams,
|
|
215
|
+
downloadTicketParams: c.downloadTicketParams
|
|
207
216
|
});
|
|
208
217
|
};
|
|
209
218
|
const limit = vue.computed(() => {
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -705,6 +705,13 @@ var index = {
|
|
|
705
705
|
allProhibited: "All prohibited",
|
|
706
706
|
expandAll: "Expand all",
|
|
707
707
|
collapseAll: "Collapse all"
|
|
708
|
+
},
|
|
709
|
+
signature: {
|
|
710
|
+
undo: "Undo",
|
|
711
|
+
rewrite: "Rewrite",
|
|
712
|
+
confirm: "Confirm",
|
|
713
|
+
addSignature: "Click here to add signature",
|
|
714
|
+
signaturePrompt: "Please write horizontally in the blank area"
|
|
708
715
|
}
|
|
709
716
|
},
|
|
710
717
|
panelComponent: {
|
|
@@ -701,6 +701,13 @@ var index = {
|
|
|
701
701
|
allProhibited: "\u5168\u90E8\u7981\u6B62",
|
|
702
702
|
expandAll: "\u5168\u90E8\u5C55\u5F00",
|
|
703
703
|
collapseAll: "\u5168\u90E8\u6536\u8D77"
|
|
704
|
+
},
|
|
705
|
+
signature: {
|
|
706
|
+
undo: "\u64A4\u9500",
|
|
707
|
+
rewrite: "\u91CD\u5199",
|
|
708
|
+
confirm: "\u786E\u8BA4",
|
|
709
|
+
addSignature: "\u70B9\u51FB\u6B64\u5904\u6DFB\u52A0\u7B7E\u540D",
|
|
710
|
+
signaturePrompt: "\u8BF7\u5728\u7A7A\u767D\u533A\u57DF\u5185\u6A2A\u5411\u4E66\u5199"
|
|
704
711
|
}
|
|
705
712
|
},
|
|
706
713
|
panelComponent: {
|
package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.cjs
CHANGED
|
@@ -50,7 +50,7 @@ const AsyncDataExport = /* @__PURE__ */ vue.defineComponent({
|
|
|
50
50
|
info.isFinish = true;
|
|
51
51
|
}
|
|
52
52
|
const onDownLoad = () => {
|
|
53
|
-
ibiz.util.file.fileDownload(info.fileUrl, info.fileName);
|
|
53
|
+
ibiz.util.file.fileDownload(info.fileUrl, info.fileName, void 0, false);
|
|
54
54
|
};
|
|
55
55
|
return {
|
|
56
56
|
ns,
|
|
@@ -274,7 +274,7 @@ class AppUtil {
|
|
|
274
274
|
footerToolbarItems,
|
|
275
275
|
questionToolbarItems,
|
|
276
276
|
otherToolbarItems,
|
|
277
|
-
question: async (aiChat, ctx, param, other, arr) => {
|
|
277
|
+
question: async (aiChat, ctx, param, other, arr, sessionid) => {
|
|
278
278
|
id = qxUtil.createUUID();
|
|
279
279
|
abortController = new AbortController();
|
|
280
280
|
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
@@ -315,7 +315,8 @@ class AppUtil {
|
|
|
315
315
|
ctx,
|
|
316
316
|
param,
|
|
317
317
|
{
|
|
318
|
-
messages: arr
|
|
318
|
+
messages: arr,
|
|
319
|
+
sessionid
|
|
319
320
|
}
|
|
320
321
|
);
|
|
321
322
|
} catch (error) {
|
|
@@ -349,11 +350,10 @@ class AppUtil {
|
|
|
349
350
|
history: async (ctx, param, other) => {
|
|
350
351
|
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
351
352
|
const historyData = other.appendCurData ? other.appendCurData : {};
|
|
352
|
-
const result = await deService.aiChatHistory(
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
);
|
|
353
|
+
const result = await deService.aiChatHistory(ctx, param, {
|
|
354
|
+
historyData,
|
|
355
|
+
sessionid: other.sessionid
|
|
356
|
+
});
|
|
357
357
|
if (result.data && Array.isArray(result.data)) {
|
|
358
358
|
let preMsg;
|
|
359
359
|
result.data.forEach((item) => {
|
|
@@ -25,6 +25,10 @@ class GanttViewEngine extends treeGridExView_engine.TreeGridExViewEngine {
|
|
|
25
25
|
this.gantt.saveAll();
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
+
if (key === runtime.SysUIActionTag.REFRESH) {
|
|
29
|
+
await this.gantt.refresh();
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
28
32
|
return super.call(key, args);
|
|
29
33
|
}
|
|
30
34
|
async onCreated() {
|
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.22",
|
|
4
4
|
"description": "web端组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
32
32
|
"@floating-ui/dom": "^1.5.3",
|
|
33
|
-
"@ibiz-template-plugin/ai-chat": "^0.0.
|
|
33
|
+
"@ibiz-template-plugin/ai-chat": "^0.0.29",
|
|
34
34
|
"@ibiz-template-plugin/gantt": "0.1.8-alpha.299",
|
|
35
35
|
"@ibiz-template-plugin/bi-report": "0.0.26",
|
|
36
36
|
"@ibiz-template-plugin/data-view": "0.0.4",
|
|
37
37
|
"@ibiz-template/core": "0.7.41-alpha.18",
|
|
38
38
|
"@ibiz-template/devtool": "0.0.11",
|
|
39
|
-
"@ibiz-template/model-helper": "0.7.41-alpha.
|
|
40
|
-
"@ibiz-template/runtime": "0.7.41-alpha.
|
|
39
|
+
"@ibiz-template/model-helper": "0.7.41-alpha.22",
|
|
40
|
+
"@ibiz-template/runtime": "0.7.41-alpha.22",
|
|
41
41
|
"@ibiz-template/theme": "0.7.39",
|
|
42
|
-
"@ibiz-template/vue3-util": "0.7.41-alpha.
|
|
42
|
+
"@ibiz-template/vue3-util": "0.7.41-alpha.22",
|
|
43
43
|
"@ibiz-template/web-theme": "3.8.0",
|
|
44
|
-
"@ibiz/model-core": "^0.1.
|
|
44
|
+
"@ibiz/model-core": "^0.1.81",
|
|
45
45
|
"@imengyu/vue3-context-menu": "^1.3.5",
|
|
46
46
|
"@monaco-editor/loader": "^1.4.0",
|
|
47
47
|
"@wangeditor/editor": "^5.1.23",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@ibiz-template/runtime": "^0.7.0",
|
|
109
109
|
"@ibiz-template/theme": "^0.7.0",
|
|
110
110
|
"@ibiz-template/vue3-util": "^0.7.0",
|
|
111
|
-
"@ibiz/model-core": "^0.1.
|
|
111
|
+
"@ibiz/model-core": "^0.1.81",
|
|
112
112
|
"@imengyu/vue3-context-menu": "^1.3.3",
|
|
113
113
|
"@monaco-editor/loader": "^1.3.3",
|
|
114
114
|
"@wangeditor/editor": "^5.1.23",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["vue","@ibiz-template/vue3-util","qx-util","cherry-markdown"],(function(e){"use strict";var t,l,n,o,i,r,a,s,c,d,u,m,h,p;return{setters:[function(e){t=e.defineComponent,l=e.ref,n=e.watch,o=e.onMounted,i=e.onBeforeUnmount,r=e.onUnmounted,a=e.createVNode,s=e.nextTick},function(e){c=e.getMarkDownProps,d=e.getEditorEmits,u=e.useNamespace,m=e.useUIStore},function(e){h=e.createUUID},function(e){p=e.default}],execute:function(){e("default",t({name:"IBizMarkDown",props:c(),emits:d(),setup(e,{emit:t}){var a,c;const d=u("markdown"),f=e.controller,b=l("");let v=null;const g=h(),w=ibiz.util.file.getUploadHeaders(),k=l({...w}),y=l(""),C=(null==(a=null==f?void 0:f.editorParams)?void 0:a.customTheme)||(null==(c=null==f?void 0:f.editorParams)?void 0:c.customtheme),{UIStore:x}=m(),U=l(C||x.theme),z=l("editOnly");let D=null,E=0;const T=l({});let B=!1;n((()=>e.data),(e=>{if(e&&f){const t={...f.editorParams};t.uploadparams&&(t.uploadParams=JSON.parse(t.uploadparams));const l=ibiz.util.file.calcFileUpDownUrl(f.context,f.params,e,t);y.value=l.uploadUrl}}),{immediate:!0,deep:!0});const P=l(),M=async(t,l)=>{const n=await ibiz.util.file.fileUpload(y.value,t,k.value),o=((e,t)=>{if(!f)return"";const l={...f.editorParams};return l.exportparams&&(l.exportParams=JSON.parse(l.exportparams)),t&&t.folder&&(l.osscat=t.folder),ibiz.util.file.calcFileUpDownUrl(f.context,f.params,e,l).downloadUrl})(e.data||{},n.fileid);let i=o.replace("%fileId%",n.fileid);if(ibiz.config.common.enableDownloadTicket&&f){const e=await ibiz.util.file.getDownloadTicket(f.context,{fileId:n.fileid});e&&e.ticket&&(i=o.replace("%fileId%",e.ticket),l(i))}else l(i)},S=()=>null==v?void 0:v.getMarkdown(),I=e=>{B=!0,null==v||v.setMarkdown(e,!1)};n((()=>e.value),((e,t)=>{e!==t&&(b.value=e||"")}),{immediate:!0}),n(b,((e,t)=>{const l=S();e!==t&&l!==e&&I(e)}));const N=e=>{t("change",S(),null==f?void 0:f.model.id,B),B=!1},O=(e,t)=>({[e]:t}),V=(e,t="")=>{const l=document.createElement(e);return l.className=t,l},q=e=>V("i","ch-icon ch-icon-".concat(e)),R=d.e("fullscreen"),j=e=>{for(;e.firstChild;)e.removeChild(e.firstChild)},H=()=>{if(v&&P.value){const e=v.editor.options.editorDom.parentElement;if(!e)return{};const t=e.classList,l=P.value.querySelector(".".concat(R));return l?{parentElement:e,cherryClass:t,fullscreenNode:l}:{}}return{}},L=()=>{const{parentElement:e,cherryClass:t,fullscreenNode:l}=H();e&&t&&l&&(j(l),l.appendChild(q("fullscreen")),l.title=ibiz.i18n.t("editor.common.fullscreen"),t.remove("fullscreen"),null==e||e.blur(),e.setAttribute("tabindex","-1"))},A=()=>{const{cherryClass:e}=H();return null==e?void 0:e.contains("fullscreen")},F=()=>{v&&P.value&&(A()?L():(()=>{const{parentElement:e,cherryClass:t,fullscreenNode:l}=H();e&&t&&l&&(j(l),l.appendChild(q("minscreen")),t.add("fullscreen"),l.title=ibiz.i18n.t("editor.common.minimize"),e.setAttribute("tabindex","-1"),s((()=>null==e?void 0:e.focus())))})())},J=e=>{e.stopPropagation(),"Escape"===e.key&&A()&&L()};n((()=>x.theme),(e=>{U.value=C||e,null==v||v.setTheme(U.value),null==v||v.setCodeBlockTheme(U.value)}));return o((()=>{var t;(e.disabled||e.readonly)&&(z.value="previewOnly"),s((()=>{var t;v=new p({id:g,value:b.value,previewer:{enablePreviewerBubble:!(e.disabled||e.readonly)},themeSettings:{mainTheme:U.value,codeBlockTheme:U.value},fileUpload:M,emoji:{useUnicode:!0},header:{anchorStyle:"autonumber"},editor:{height:"100%",defaultModel:z.value,codemirror:{autofocus:!1}},toolbars:{toolbar:["bold","italic","underline","strikethrough","|","color","header","|","list","image",{insert:["link","hr","br","code","formula","toc","table","line-table","bar-table"]},"settings","togglePreview"],bubble:["bold","italic","underline","strikethrough","sub","sup","|","size","color"],float:["h1","h2","h3","|","checklist","quote","quickTable","code"],customMenu:[],sidebar:[]},callback:{afterChange:N,beforeImageMounted:O},engine:{syntax:{table:{enableChart:!1,externals:["echarts"]}}}}),v.setTheme(U.value),C&&(v.setTheme(C),v.setCodeBlockTheme(C));const l=V("span","".concat(R," cherry-toolbar-button"));l.title=ibiz.i18n.t("editor.common.fullscreen"),l.onclick=F,l.appendChild(q("fullscreen"));const n=e.disabled?v.editor.options.editorDom.parentElement:null==(t=v.editor.options.editorDom.parentElement)?void 0:t.querySelector(".cherry-toolbar>.toolbar-right");null==n||n.appendChild(l)})),(()=>{if(window.ResizeObserver&&P.value){const e={width:P.value.offsetWidth?"".concat(P.value.offsetWidth,"px"):"100%"};f&&"number"==typeof f.parent.model.height&&Object.assign(e,{height:"".concat(f.parent.model.height,"px")}),T.value=d.cssVarBlock(e),D=new ResizeObserver((e=>{const t=e[0].contentRect.width;if(t!==E){const l={width:"".concat(e[0].contentRect.width,"px")};f&&"number"==typeof f.parent.model.height&&Object.assign(l,{height:"".concat(f.parent.model.height,"px")}),T.value=d.cssVarBlock(l),E=t}})),D.observe(P.value)}})(),null==(t=P.value)||t.addEventListener("keydown",J.bind(this))})),i((()=>{var e;null==(e=P.value)||e.removeEventListener("keydown",J.bind(this))})),r((()=>{v=null,D&&D.disconnect()})),{ns:d,currentVal:b,id:g,editor:v,markDownBox:P,headers:k,theme:U,defaultModel:z,cssVars:T,getCherryHtml:()=>null==v?void 0:v.getHtml(),getCherryContent:S,setCherryContent:I}},render(){return a("div",{ref:"markDownBox",class:[this.ns.b(),this.ns.is("disabled",this.disabled)]},[a("div",{id:this.id,style:this.cssVars,class:this.ns.b("cherry")},null)])}}))}}}));
|