@ibiz-template/vue3-components 0.7.41-alpha.42 → 0.7.41-alpha.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/ibiz-markdown-editor-CUzKkFER.js +1 -0
  2. package/dist/{index-CaWTEUU1.js → index-DgqTP4Vw.js} +1 -1
  3. package/dist/{index-CD2XM6M6.js → index-Dr0VM8iS.js} +1 -1
  4. package/dist/index-DtEaU3-5.js +11 -0
  5. package/dist/index.min.css +1 -1
  6. package/dist/index.system.min.js +1 -1
  7. package/dist/wang-editor-CRWSwyXY.js +1 -0
  8. package/dist/{xlsx-util-B1eGfH7d.js → xlsx-util-CMJON8Uq.js} +1 -1
  9. package/es/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.mjs +2 -1
  10. package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.mjs +22 -11
  11. package/es/control/toolbar/export-excel/export-excel.mjs +19 -4
  12. package/es/editor/carousel/ibiz-carousel/ibiz-carousel.mjs +5 -2
  13. package/es/editor/code/monaco-editor/monaco-editor.mjs +8 -194
  14. package/es/editor/html/wang-editor/module/ai-module.mjs +1 -1
  15. package/es/editor/html/wang-editor/wang-editor.mjs +35 -207
  16. package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +11 -222
  17. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  18. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +23 -12
  19. package/es/editor/text-box/input/input.mjs +11 -197
  20. package/es/editor/text-box/signature/signature.mjs +28 -15
  21. package/es/editor/upload/upload-editor.controller.mjs +12 -1
  22. package/es/editor/upload/use/use-iview-upload.mjs +28 -13
  23. package/es/locale/en/index.mjs +29 -2
  24. package/es/locale/zh-CN/index.mjs +29 -2
  25. package/es/panel-component/coop-pos/coop-pos.controller.mjs +11 -1
  26. package/es/panel-component/panel-app-title/panel-app-title.controller.mjs +3 -1
  27. package/es/panel-component/panel-app-title/panel-app-title.mjs +22 -43
  28. package/es/util/ai-chat-util/ai-chat-util.mjs +672 -7
  29. package/es/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
  30. package/es/util/ai-chat-util/ai-feedback/ai-feedback.mjs +130 -0
  31. package/es/util/app-util/app-util.mjs +26 -247
  32. package/es/util/inline-ai-util/inline-ai-textarea/common/ai-think/ai-think.css +1 -0
  33. package/es/util/inline-ai-util/inline-ai-textarea/common/ai-think/ai-think.mjs +56 -0
  34. package/es/util/inline-ai-util/inline-ai-textarea/common/ai-tool-call/ai-tool-call.css +1 -0
  35. package/es/util/inline-ai-util/inline-ai-textarea/common/ai-tool-call/ai-tool-call.mjs +52 -0
  36. package/es/util/inline-ai-util/inline-ai-textarea/common/ai-tool-call-item/ai-tool-call-item.css +1 -0
  37. package/es/util/inline-ai-util/inline-ai-textarea/common/ai-tool-call-item/ai-tool-call-item.mjs +143 -0
  38. package/es/util/inline-ai-util/inline-ai-textarea/common/index.mjs +4 -0
  39. package/es/util/inline-ai-util/inline-ai-textarea/icon.mjs +52 -1
  40. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -1
  41. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +34 -4
  42. package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +32 -25
  43. package/es/util/inline-ai-util/inline-ai-textarea/interface.mjs +1 -0
  44. package/lib/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.cjs +2 -1
  45. package/lib/control/grid/grid-column/grid-field-column/attachment-column/file-util.cjs +22 -11
  46. package/lib/control/toolbar/export-excel/export-excel.cjs +18 -3
  47. package/lib/editor/carousel/ibiz-carousel/ibiz-carousel.cjs +5 -2
  48. package/lib/editor/code/monaco-editor/monaco-editor.cjs +8 -194
  49. package/lib/editor/html/wang-editor/module/ai-module.cjs +1 -1
  50. package/lib/editor/html/wang-editor/wang-editor.cjs +34 -206
  51. package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +11 -222
  52. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +23 -12
  53. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  54. package/lib/editor/text-box/input/input.cjs +10 -196
  55. package/lib/editor/text-box/signature/signature.cjs +28 -15
  56. package/lib/editor/upload/upload-editor.controller.cjs +12 -1
  57. package/lib/editor/upload/use/use-iview-upload.cjs +28 -13
  58. package/lib/locale/en/index.cjs +29 -2
  59. package/lib/locale/zh-CN/index.cjs +29 -2
  60. package/lib/panel-component/coop-pos/coop-pos.controller.cjs +11 -1
  61. package/lib/panel-component/panel-app-title/panel-app-title.cjs +21 -42
  62. package/lib/panel-component/panel-app-title/panel-app-title.controller.cjs +3 -1
  63. package/lib/util/ai-chat-util/ai-chat-util.cjs +670 -5
  64. package/lib/util/ai-chat-util/ai-feedback/ai-feedback.cjs +132 -0
  65. package/lib/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
  66. package/lib/util/app-util/app-util.cjs +25 -246
  67. package/lib/util/inline-ai-util/inline-ai-textarea/common/ai-think/ai-think.cjs +58 -0
  68. package/lib/util/inline-ai-util/inline-ai-textarea/common/ai-think/ai-think.css +1 -0
  69. package/lib/util/inline-ai-util/inline-ai-textarea/common/ai-tool-call/ai-tool-call.cjs +54 -0
  70. package/lib/util/inline-ai-util/inline-ai-textarea/common/ai-tool-call/ai-tool-call.css +1 -0
  71. package/lib/util/inline-ai-util/inline-ai-textarea/common/ai-tool-call-item/ai-tool-call-item.cjs +145 -0
  72. package/lib/util/inline-ai-util/inline-ai-textarea/common/ai-tool-call-item/ai-tool-call-item.css +1 -0
  73. package/lib/util/inline-ai-util/inline-ai-textarea/common/index.cjs +9 -0
  74. package/lib/util/inline-ai-util/inline-ai-textarea/icon.cjs +54 -0
  75. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +31 -24
  76. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -1
  77. package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +34 -4
  78. package/lib/util/inline-ai-util/inline-ai-textarea/interface.cjs +3 -0
  79. package/package.json +7 -7
  80. package/dist/ibiz-markdown-editor-pEdb_gS_.js +0 -1
  81. package/dist/index-BObZTN7-.js +0 -11
  82. package/dist/wang-editor-Ck-JCWqK.js +0 -1
@@ -15,7 +15,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
15
15
  emit,
16
16
  slots
17
17
  }) {
18
- var _a, _b, _c;
18
+ var _a, _b, _c, _d, _e;
19
19
  const ns = useNamespace("markdown");
20
20
  const c = props.controller;
21
21
  const currentVal = ref("");
@@ -31,13 +31,14 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
31
31
  });
32
32
  const uploadUrl = ref("");
33
33
  const customTheme = ((_a = c == null ? void 0 : c.editorParams) == null ? void 0 : _a.customTheme) || ((_b = c == null ? void 0 : c.editorParams) == null ? void 0 : _b.customtheme);
34
+ const enableNoAccess = ((_c = c == null ? void 0 : c.editorParams) == null ? void 0 : _c.enablenoaccess) === "true";
34
35
  const {
35
36
  UIStore
36
37
  } = useUIStore();
37
38
  const theme = ref(customTheme || UIStore.theme);
38
39
  const isEditing = ref(false);
39
40
  let showmode = "default";
40
- if (c && ((_c = c.editorParams) == null ? void 0 : _c.showmode)) {
41
+ if (c && ((_d = c.editorParams) == null ? void 0 : _d.showmode)) {
41
42
  showmode = c.editorParams.showmode;
42
43
  }
43
44
  const isFullScreen = ref(false);
@@ -50,6 +51,10 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
50
51
  const lastDirectoryState = ref("pure");
51
52
  let isIgnoreChange = false;
52
53
  let chatInstance;
54
+ let tocPos = "absolute";
55
+ if ((_e = c == null ? void 0 : c.editorparams) == null ? void 0 : _e.tocpos) {
56
+ tocPos = c.editorparams.tocpos === "fixed" ? "fixed" : "absolute";
57
+ }
53
58
  const [AIMenu, AIChart] = initCustomMenu(c, {
54
59
  props,
55
60
  chatInstance,
@@ -60,7 +65,8 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
60
65
  watch(() => props.data, (newVal) => {
61
66
  if (newVal && c) {
62
67
  const editorParams = {
63
- ...c.editorParams
68
+ ...c.editorParams,
69
+ enableNoAccess
64
70
  };
65
71
  if (editorParams.uploadparams) {
66
72
  editorParams.uploadParams = JSON.parse(editorParams.uploadparams);
@@ -78,7 +84,8 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
78
84
  return "";
79
85
  }
80
86
  const editorParams = {
81
- ...c.editorParams
87
+ ...c.editorParams,
88
+ enableNoAccess
82
89
  };
83
90
  if (editorParams.exportparams) {
84
91
  editorParams.exportParams = JSON.parse(editorParams.exportparams);
@@ -93,7 +100,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
93
100
  const data = await ibiz.util.file.fileUpload(uploadUrl.value, file, headers.value);
94
101
  const downloadUrl = getDownloadUrl(props.data || {}, data.fileid);
95
102
  let url = downloadUrl.replace("%fileId%", data.fileid);
96
- if (ibiz.config.common.enableDownloadTicket && c) {
103
+ if (ibiz.config.common.enableDownloadTicket && c && c.editorParams && !enableNoAccess) {
97
104
  const downloadTicket = await ibiz.util.file.getDownloadTicket(c.context, c.params, props.data || {}, {
98
105
  fileId: data.fileid
99
106
  }, c.downloadTicketParams);
@@ -134,7 +141,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
134
141
  setCherryContent(newVal);
135
142
  }
136
143
  });
137
- const afterChange = (_e) => {
144
+ const afterChange = (_e2) => {
138
145
  if (showmode === "manual") {
139
146
  return;
140
147
  }
@@ -227,10 +234,10 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
227
234
  }
228
235
  }
229
236
  };
230
- const handleKeyDown = (_e) => {
231
- _e.stopPropagation();
232
- if (_e.key === "Escape") {
233
- _e.preventDefault();
237
+ const handleKeyDown = (_e2) => {
238
+ _e2.stopPropagation();
239
+ if (_e2.key === "Escape") {
240
+ _e2.preventDefault();
234
241
  if (isFullscreen()) {
235
242
  closeFullscreen();
236
243
  editor.toggleToc(lastDirectoryState.value);
@@ -328,7 +335,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
328
335
  // pure: 精简模式/缩略模式,只有一排小点; full: 完整模式,会展示所有标题
329
336
  showAutoNumber: true,
330
337
  // 是否显示自增序号
331
- position: "absolute",
338
+ position: tocPos,
332
339
  // 悬浮目录的悬浮方式。当滚动条在cherry内部时,用absolute;当滚动条在cherry外部时,用fixed
333
340
  cssText: ""
334
341
  // 自定义样式
@@ -352,6 +359,9 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
352
359
  }
353
360
  });
354
361
  editor.toggleToc("pure");
362
+ const html = editor.engine.makeHtml(currentVal.value);
363
+ editor.previewer.update(html);
364
+ editor.toc.updateTocList();
355
365
  editor.setTheme(theme.value);
356
366
  if (customTheme) {
357
367
  editor.setTheme(customTheme);
@@ -514,6 +524,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
514
524
  markDownBox,
515
525
  headers,
516
526
  theme,
527
+ UIStore,
517
528
  defaultModel,
518
529
  cssVars,
519
530
  isEditing,
@@ -536,7 +547,7 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
536
547
  "tabindex": "-1",
537
548
  "id": this.id,
538
549
  "style": this.cssVars,
539
- "class": [this.ns.b("cherry"), this.ns.m(this.theme === "dark" ? "dark" : "light")]
550
+ "class": [this.ns.b("cherry"), this.ns.m(this.UIStore.theme === "dark" ? "dark" : "light")]
540
551
  }, null)]);
541
552
  }
542
553
  });
@@ -1,9 +1,7 @@
1
1
  import { isVNode, defineComponent, createVNode, resolveComponent, mergeProps, ref, computed, watch, onUnmounted } from 'vue';
2
2
  import { debounce } from 'lodash-es';
3
3
  import { useNamespace, useUIStore, useCodeListListen, getEditorEmits, getInputProps } from '@ibiz-template/vue3-util';
4
- import { UIActionUtil, SysUIActionTag } from '@ibiz-template/runtime';
5
- import { isEmoji, base64ToStr, IBizContext } from '@ibiz-template/core';
6
- import { createUUID } from 'qx-util';
4
+ import { isEmoji, base64ToStr } from '@ibiz-template/core';
7
5
  import './input.css';
8
6
 
9
7
  "use strict";
@@ -164,25 +162,22 @@ const IBizInput = /* @__PURE__ */ defineComponent({
164
162
  const appDataEntityId = c.model.appDataEntityId;
165
163
  if (!appDataEntityId || !c.deACMode)
166
164
  return;
167
- const {
168
- contentToolbarItems,
169
- footerToolbarItems,
170
- questionToolbarItems,
171
- otherToolbarItems
172
- } = ibiz.aiChatUtil.calcAiToolbarItemsByAc(c.deACMode);
173
- const aiAgentlist = await ibiz.aiChatUtil.getAIAgentList(c.context, c.params, c.editorParams);
174
- const {
175
- containerOptions,
176
- chatOptions
177
- } = ibiz.aiChatUtil.getEditorExAIChatParams(c.editorParams, c.context, c.params, props.data);
178
165
  const {
179
166
  zIndex
180
167
  } = useUIStore();
181
168
  const containerZIndex = zIndex.increment();
182
169
  chatInstance = await ibiz.aiChatUtil.getAIChat();
183
- let id = "";
184
- let abortController;
170
+ const {
171
+ containerOptions,
172
+ chatOptions
173
+ } = await ibiz.aiChatUtil.getEditorExAIChatParams(c.editorParams, c.context, c.params, props.data, c.deACMode, {
174
+ chatInstance,
175
+ view: c.view,
176
+ ctrl: c.ctrl
177
+ });
178
+ const resourceOptions = await ibiz.aiChatUtil.getAIResourceOptions(c.context, c.params);
185
179
  chatInstance.create({
180
+ resourceOptions,
186
181
  containerOptions: {
187
182
  zIndex: containerZIndex,
188
183
  ...containerOptions
@@ -197,191 +192,10 @@ const IBizInput = /* @__PURE__ */ defineComponent({
197
192
  srfactag: c.deACMode.codeName
198
193
  },
199
194
  appDataEntityId,
200
- contentToolbarItems,
201
- footerToolbarItems,
202
- questionToolbarItems,
203
- otherToolbarItems,
204
- aiAgentlist,
205
195
  ...chatOptions,
206
- question: async (aiChat, ctx, param, other, arr, sessionid, srfaiagent, srfmode) => {
207
- id = createUUID();
208
- abortController = new AbortController();
209
- const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
210
- try {
211
- const questionRequestData = {
212
- messages: arr,
213
- sessionid
214
- };
215
- if (srfaiagent) {
216
- questionRequestData.srfaiagent = srfaiagent;
217
- }
218
- if (srfmode) {
219
- questionRequestData.mode = srfmode;
220
- }
221
- await deService.aiChatSse((msg) => {
222
- if (msg.actionstate === 20 && msg.actionresult) {
223
- aiChat.addMessage({
224
- messageid: id,
225
- state: msg.actionstate,
226
- type: "DEFAULT",
227
- role: "ASSISTANT",
228
- content: msg.actionresult
229
- });
230
- } else if (msg.actionstate === 30 && msg.actionresult) {
231
- const result = JSON.parse(msg.actionresult);
232
- const choices = result.choices;
233
- if (choices && choices.length > 0) {
234
- aiChat.replaceMessage({
235
- messageid: id,
236
- state: msg.actionstate,
237
- type: "DEFAULT",
238
- role: "ASSISTANT",
239
- content: choices[0].content || ""
240
- });
241
- }
242
- } else if (msg.actionstate === 40) {
243
- aiChat.replaceMessage({
244
- messageid: id,
245
- state: msg.actionstate,
246
- type: "ERROR",
247
- role: "ASSISTANT",
248
- content: msg.actionresult
249
- });
250
- }
251
- }, abortController, ctx, param, {
252
- ...questionRequestData
253
- });
254
- } catch (error) {
255
- aiChat.replaceMessage({
256
- messageid: id,
257
- state: 40,
258
- type: "ERROR",
259
- role: "ASSISTANT",
260
- content: error.message || ibiz.i18n.t("app.aiError")
261
- });
262
- abortController == null ? void 0 : abortController.abort();
263
- } finally {
264
- aiChat.completeMessage(id, true);
265
- return true;
266
- }
267
- },
268
- abortQuestion: async (aiChat) => {
269
- abortController == null ? void 0 : abortController.abort();
270
- await aiChat.stopMessage({
271
- messageid: id,
272
- state: 30,
273
- type: "DEFAULT",
274
- role: "ASSISTANT",
275
- content: ""
276
- });
277
- await aiChat.completeMessage(id, true);
278
- },
279
196
  action: (action, message) => {
280
197
  if (action === "backfill")
281
198
  emit("change", message.realcontent);
282
- },
283
- history: async (ctx, param, other) => {
284
- const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
285
- const historyRequestData = {};
286
- if (other.appendCurData) {
287
- Object.assign(historyRequestData, {
288
- ...other.appendCurData
289
- });
290
- }
291
- if (other.srfaiagent) {
292
- Object.assign(historyRequestData, {
293
- srfaiagent: other.srfaiagent
294
- });
295
- }
296
- if (other.srfmode) {
297
- Object.assign(historyRequestData, {
298
- mode: other.srfmode
299
- });
300
- }
301
- const result = await deService.aiChatHistory(ctx, param, historyRequestData);
302
- if (result.data && Array.isArray(result.data)) {
303
- let preMsg;
304
- result.data.forEach((item) => {
305
- if (item.role === "TOOL") {
306
- if (preMsg && item.content) {
307
- chatInstance.aiChat.updateRecommendPrompt(preMsg, item.content);
308
- }
309
- } else {
310
- const msg = {
311
- messageid: createUUID(),
312
- state: 30,
313
- type: "DEFAULT",
314
- role: item.role,
315
- content: item.content,
316
- completed: true
317
- };
318
- preMsg = msg;
319
- chatInstance.aiChat.addMessage(msg);
320
- }
321
- });
322
- }
323
- return true;
324
- },
325
- recommendPrompt: async (ctx, param, other) => {
326
- const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
327
- const result = await deService.aiChatRecommendPrompt(ctx, param, other.message);
328
- if (result.ok && result.data) {
329
- const choices = result.data.choices;
330
- if (choices && choices.length > 0) {
331
- return choices[0];
332
- }
333
- return null;
334
- }
335
- return null;
336
- },
337
- uploader: {
338
- onUpload: async (file, reportProgress, options) => {
339
- const fileMeata = ibiz.util.file.calcFileUpDownUrl((options == null ? void 0 : options.context) || c.context, (options == null ? void 0 : options.params) || c.params, {});
340
- const uploadHeaders = ibiz.util.file.getUploadHeaders();
341
- const formData = new FormData();
342
- formData.append("file", file);
343
- const res = await ibiz.net.axios({
344
- url: fileMeata.uploadUrl,
345
- method: "post",
346
- headers: uploadHeaders,
347
- data: formData,
348
- onUploadProgress: (progressEvent) => {
349
- const percent = progressEvent.loaded / progressEvent.total * 100;
350
- reportProgress(percent);
351
- }
352
- });
353
- return res.data;
354
- }
355
- },
356
- extendToolbarClick: async (event, source, context, params, data) => {
357
- var _a, _b;
358
- const result = await UIActionUtil.exec(source.id, {
359
- view: c.view,
360
- ctrl: c.ctrl,
361
- context: IBizContext.create(context),
362
- params,
363
- data: [data],
364
- event
365
- }, source.appId);
366
- if (result.closeView) {
367
- c.view.closeView({
368
- ok: true
369
- });
370
- } else if (result.refresh) {
371
- switch (result.refreshMode) {
372
- case 1:
373
- c.view.callUIAction(SysUIActionTag.REFRESH);
374
- break;
375
- case 2:
376
- (_a = c.view.parentView) == null ? void 0 : _a.callUIAction(SysUIActionTag.REFRESH);
377
- break;
378
- case 3:
379
- (_b = c.view.getTopView()) == null ? void 0 : _b.callUIAction(SysUIActionTag.REFRESH);
380
- break;
381
- default:
382
- }
383
- }
384
- return result;
385
199
  }
386
200
  }
387
201
  });
@@ -11,6 +11,7 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
11
11
  setup(props, {
12
12
  emit
13
13
  }) {
14
+ var _a;
14
15
  const ns = useNamespace("signature");
15
16
  const c = props.controller;
16
17
  const editorModel = c.model;
@@ -23,6 +24,7 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
23
24
  const fullScreen = ref(false);
24
25
  const currentDataURL = ref("");
25
26
  const currentVal = ref("");
27
+ let enableNoAccess = ((_a = c == null ? void 0 : c.editorParams) == null ? void 0 : _a.enablenoaccess) === "true";
26
28
  let saveMode = "img";
27
29
  let buttons = [{
28
30
  label: ibiz.i18n.t("editor.signature.undo"),
@@ -46,6 +48,9 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
46
48
  ibiz.log.error(error);
47
49
  }
48
50
  }
51
+ if (editorModel.editorParams.enablenoaccess) {
52
+ enableNoAccess = editorModel.editorParams.enablenoaccess === "true";
53
+ }
49
54
  }
50
55
  const showFormDefaultContent = computed(() => {
51
56
  if (props.controlParams && props.controlParams.editmode === "hover" && !props.readonly) {
@@ -54,12 +59,12 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
54
59
  return false;
55
60
  });
56
61
  const restCavans = () => {
57
- var _a;
58
- (_a = signatureRef.value) == null ? void 0 : _a.updateSignaturePad(() => {
62
+ var _a2;
63
+ (_a2 = signatureRef.value) == null ? void 0 : _a2.updateSignaturePad(() => {
59
64
  nextTick(() => {
60
- var _a2, _b;
65
+ var _a3, _b;
61
66
  if (currentDataURL.value) {
62
- (_a2 = signatureRef.value) == null ? void 0 : _a2.signaturePad.fromDataURL(currentDataURL.value);
67
+ (_a3 = signatureRef.value) == null ? void 0 : _a3.signaturePad.fromDataURL(currentDataURL.value);
63
68
  } else {
64
69
  (_b = signatureRef.value) == null ? void 0 : _b.signaturePad.clear();
65
70
  }
@@ -67,7 +72,7 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
67
72
  });
68
73
  };
69
74
  const handleCurrentVal = async () => {
70
- var _a, _b;
75
+ var _a2, _b;
71
76
  if (currentVal.value) {
72
77
  ibiz.loading.showRedirect();
73
78
  if (saveMode === "img") {
@@ -77,7 +82,8 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
77
82
  const _url = downloadUrl.value.replace("%fileId%", fileData.id);
78
83
  try {
79
84
  const editorParams = {
80
- ...c.editorParams
85
+ ...c.editorParams,
86
+ enableNoAccess
81
87
  };
82
88
  if (editorParams.exportparams) {
83
89
  editorParams.exportParams = JSON.parse(editorParams.exportparams);
@@ -91,8 +97,8 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
91
97
  },
92
98
  extraParams: editorParams,
93
99
  downloadTicketParams: c.downloadTicketParams
94
- });
95
- const dataUrl = await ((_a = signatureRef.value) == null ? void 0 : _a.signaturePad.blobToDataURL(fileBlob));
100
+ }, void 0, enableNoAccess);
101
+ const dataUrl = await ((_a2 = signatureRef.value) == null ? void 0 : _a2.signaturePad.blobToDataURL(fileBlob));
96
102
  currentDataURL.value = dataUrl;
97
103
  } catch (error) {
98
104
  ibiz.log.error(error);
@@ -106,7 +112,14 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
106
112
  };
107
113
  watch(() => props.data, (newVal) => {
108
114
  if (newVal) {
109
- const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, newVal, c.editorParams);
115
+ const editorParams = {
116
+ ...c.editorParams,
117
+ enableNoAccess
118
+ };
119
+ if (editorParams.uploadparams) {
120
+ editorParams.uploadParams = JSON.parse(editorParams.uploadparams);
121
+ }
122
+ const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, newVal, editorParams);
110
123
  uploadUrl.value = urls.uploadUrl;
111
124
  downloadUrl.value = urls.downloadUrl;
112
125
  }
@@ -149,8 +162,8 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
149
162
  return fileInfo;
150
163
  };
151
164
  const handleRemove = () => {
152
- var _a;
153
- (_a = signatureRef.value) == null ? void 0 : _a.signaturePad.clear();
165
+ var _a2;
166
+ (_a2 = signatureRef.value) == null ? void 0 : _a2.signaturePad.clear();
154
167
  currentDataURL.value = "";
155
168
  handleEmit(null);
156
169
  };
@@ -162,9 +175,9 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
162
175
  }]));
163
176
  };
164
177
  const handleConfirm = () => {
165
- var _a, _b, _c;
178
+ var _a2, _b, _c;
166
179
  fullScreen.value = false;
167
- if (!((_a = signatureRef.value) == null ? void 0 : _a.signaturePad.isRedrawn()))
180
+ if (!((_a2 = signatureRef.value) == null ? void 0 : _a2.signaturePad.isRedrawn()))
168
181
  return;
169
182
  if ((_b = signatureRef.value) == null ? void 0 : _b.signaturePad.isEmpty()) {
170
183
  handleRemove();
@@ -185,10 +198,10 @@ const IBizSignature = /* @__PURE__ */ defineComponent({
185
198
  }
186
199
  };
187
200
  const handleButtonClick = (_type) => {
188
- var _a, _b;
201
+ var _a2, _b;
189
202
  switch (_type) {
190
203
  case "undo":
191
- (_a = signatureRef.value) == null ? void 0 : _a.signaturePad.undoLastStep();
204
+ (_a2 = signatureRef.value) == null ? void 0 : _a2.signaturePad.undoLastStep();
192
205
  break;
193
206
  case "rewrite":
194
207
  (_b = signatureRef.value) == null ? void 0 : _b.signaturePad.clear();
@@ -50,6 +50,13 @@ class UploadEditorController extends EditorController {
50
50
  * @memberof UploadEditorController
51
51
  */
52
52
  __publicField(this, "autoPreview", false);
53
+ /**
54
+ * 是否启用无权限
55
+ *
56
+ * @type {boolean}
57
+ * @memberof UploadEditorController
58
+ */
59
+ __publicField(this, "enableNoAccess", false);
53
60
  /**
54
61
  * 根据配置的映射关系转换对象属性
55
62
  * 将源对象的指定属性,按照映射规则映射到新对象的目标属性
@@ -113,7 +120,8 @@ class UploadEditorController extends EditorController {
113
120
  uploadparams,
114
121
  exportparams,
115
122
  autopreview,
116
- infomap
123
+ infomap,
124
+ enablenoaccess
117
125
  } = this.editorParams;
118
126
  if (isDrag) {
119
127
  this.isDrag = Boolean(isDrag);
@@ -139,6 +147,9 @@ class UploadEditorController extends EditorController {
139
147
  if (infomap) {
140
148
  this.infoMap = infomap;
141
149
  }
150
+ if (enablenoaccess) {
151
+ this.enableNoAccess = enablenoaccess === "true";
152
+ }
142
153
  if (uploadParams) {
143
154
  try {
144
155
  this.uploadParams = JSON.parse(uploadParams);
@@ -21,7 +21,10 @@ function useIViewUpload(props, valueChange, c) {
21
21
  { immediate: true }
22
22
  );
23
23
  const getDownloadUrl = (data, file) => {
24
- const editorParams = { ...c.editorParams };
24
+ const editorParams = {
25
+ ...c.editorParams,
26
+ enableNoAccess: c.enableNoAccess
27
+ };
25
28
  if (editorParams.exportparams) {
26
29
  editorParams.exportParams = JSON.parse(editorParams.exportparams);
27
30
  }
@@ -40,7 +43,10 @@ function useIViewUpload(props, valueChange, c) {
40
43
  () => props.data,
41
44
  (newVal) => {
42
45
  if (newVal) {
43
- const editorParams = { ...c.editorParams };
46
+ const editorParams = {
47
+ ...c.editorParams,
48
+ enableNoAccess: c.enableNoAccess
49
+ };
44
50
  if (editorParams.uploadparams) {
45
51
  editorParams.uploadParams = JSON.parse(editorParams.uploadparams);
46
52
  }
@@ -99,7 +105,7 @@ function useIViewUpload(props, valueChange, c) {
99
105
  newVal.forEach((file) => {
100
106
  const downloadUrl = getDownloadUrl(props.data, file);
101
107
  file.url = file.url || downloadUrl.replace("%fileId%", file.id);
102
- if (ibiz.config.common.enableDownloadTicket) {
108
+ if (ibiz.config.common.enableDownloadTicket && !c.enableNoAccess) {
103
109
  ibiz.util.file.getDownloadTicket(
104
110
  c.context,
105
111
  c.params,
@@ -159,7 +165,7 @@ function useIViewUpload(props, valueChange, c) {
159
165
  if (!response) {
160
166
  return;
161
167
  }
162
- if (ibiz.config.common.enableDownloadTicket && response.ticket) {
168
+ if (ibiz.config.common.enableDownloadTicket && !c.enableNoAccess && response.ticket) {
163
169
  ibiz.util.file.setDownloadTicket(response.id, response.ticket);
164
170
  }
165
171
  uploadCache.cacheFiles.push({
@@ -200,18 +206,27 @@ function useIViewUpload(props, valueChange, c) {
200
206
  const onDownload = (file) => {
201
207
  const downloadUrl = getDownloadUrl(props.data, file);
202
208
  const url = file.url || downloadUrl.replace("%fileId%", file.id);
203
- const editorParams = { ...c.editorParams };
209
+ const editorParams = {
210
+ ...c.editorParams,
211
+ enableNoAccess: c.enableNoAccess
212
+ };
204
213
  if (editorParams.exportparams) {
205
214
  editorParams.exportParams = JSON.parse(editorParams.exportparams);
206
215
  }
207
- ibiz.util.file.fileDownload(url, file.name, {
208
- context: c.context,
209
- params: c.params,
210
- data: props.data,
211
- file: { fileId: file.id, ...file },
212
- extraParams: editorParams,
213
- downloadTicketParams: c.downloadTicketParams
214
- });
216
+ ibiz.util.file.fileDownload(
217
+ url,
218
+ file.name,
219
+ {
220
+ context: c.context,
221
+ params: c.params,
222
+ data: props.data,
223
+ file: { fileId: file.id, ...file },
224
+ extraParams: editorParams,
225
+ downloadTicketParams: c.downloadTicketParams
226
+ },
227
+ void 0,
228
+ c.enableNoAccess
229
+ );
215
230
  };
216
231
  const limit = computed(() => {
217
232
  return c.multiple ? 9999 : 1;
@@ -482,7 +482,7 @@ var index = {
482
482
  },
483
483
  toolbar: {
484
484
  exportExcel: {
485
- exportAll: "Export all(Export up to 1000 rows)",
485
+ exportAll: "Export all(Export up to {maxRowCount} rows)",
486
486
  expCurrentPage: "Export current page",
487
487
  expCurrentSelect: "Export the current selection",
488
488
  page: "Page",
@@ -847,7 +847,34 @@ var index = {
847
847
  warningTitle: "Confirm termination",
848
848
  warningDesc: "Are you sure to terminate the creation?",
849
849
  thinking: "In depth thinking",
850
- thinked: "Deeply pondered"
850
+ thinked: "Deeply pondered",
851
+ collapseToolCall: "Retract tool calls",
852
+ expandToolCall: "Expand all {number} tool calls",
853
+ error: "An error occurred",
854
+ copy: "Copied"
855
+ },
856
+ aiChartUtil: {
857
+ feedback: "Feedback",
858
+ description: "Description",
859
+ regardingIssue: "Regarding the problem",
860
+ understandProblem: "Not understanding the problem",
861
+ forgotContext: "Forgot the previous text",
862
+ notFollowingRequire: "Not Following Requirements",
863
+ regardingResponse: "Regarding the effectiveness of the answer",
864
+ incorrectAswer: "Incorrect answer",
865
+ logicalConfusion: "Logical confusion",
866
+ poorTimeliness: "Poor timeliness",
867
+ poorReadability: "Poor readability",
868
+ incompleteAnswer: "Incomplete answer",
869
+ unprofessional: "The answer is vague and unprofessional",
870
+ report: "Report",
871
+ pornographicVulgar: "Pornographic Vulgar",
872
+ politicallySensitive: "Politically sensitive",
873
+ illegalCriminal: "Illegal crime",
874
+ discriminationPrejudice: "Discrimination or Prejudice Answer",
875
+ violationPrivacy: "Violation of Privacy",
876
+ contentInfringement: "Content infringement",
877
+ placeholder: "Please enter"
851
878
  }
852
879
  },
853
880
  // runTime
@@ -478,7 +478,7 @@ var index = {
478
478
  },
479
479
  toolbar: {
480
480
  exportExcel: {
481
- exportAll: "\u5BFC\u51FA\u5168\u90E8(\u6700\u5927\u5BFC\u51FA1000\u884C)",
481
+ exportAll: "\u5BFC\u51FA\u5168\u90E8(\u6700\u5927\u5BFC\u51FA{maxRowCount}\u884C)",
482
482
  expCurrentPage: "\u5BFC\u51FA\u5F53\u524D\u9875",
483
483
  expCurrentSelect: "\u5BFC\u51FA\u5F53\u524D\u9009\u4E2D",
484
484
  page: "\u9875",
@@ -843,7 +843,34 @@ var index = {
843
843
  warningTitle: "\u786E\u8BA4\u4E2D\u6B62",
844
844
  warningDesc: "\u786E\u8BA4\u4E2D\u6B62\u521B\u4F5C\u5417\uFF1F",
845
845
  thinking: "\u6DF1\u5EA6\u601D\u8003\u4E2D",
846
- thinked: "\u5DF2\u6DF1\u5EA6\u601D\u8003"
846
+ thinked: "\u5DF2\u6DF1\u5EA6\u601D\u8003",
847
+ collapseToolCall: "\u6536\u8D77\u5DE5\u5177\u8C03\u7528",
848
+ expandToolCall: "\u5C55\u5F00\u5168\u90E8 {number} \u4E2A\u5DE5\u5177\u8C03\u7528",
849
+ error: "\u53D1\u751F\u9519\u8BEF",
850
+ copy: "\u5DF2\u590D\u5236"
851
+ },
852
+ aiChartUtil: {
853
+ feedback: "\u53CD\u9988",
854
+ description: "\u63CF\u8FF0",
855
+ regardingIssue: "\u9488\u5BF9\u95EE\u9898",
856
+ understandProblem: "\u4E0D\u7406\u89E3\u95EE\u9898",
857
+ forgotContext: "\u9057\u5FD8\u4E86\u4E0A\u6587",
858
+ notFollowingRequire: "\u4E0D\u9075\u5FAA\u8981\u6C42",
859
+ regardingResponse: "\u9488\u5BF9\u56DE\u7B54\u6548\u679C",
860
+ incorrectAswer: "\u56DE\u7B54\u9519\u8BEF",
861
+ logicalConfusion: "\u903B\u8F91\u6DF7\u4E71",
862
+ poorTimeliness: "\u65F6\u6548\u6027\u5DEE",
863
+ poorReadability: "\u53EF\u8BFB\u6027\u5DEE",
864
+ incompleteAnswer: "\u56DE\u7B54\u4E0D\u5B8C\u6574",
865
+ unprofessional: "\u56DE\u7B54\u7B3C\u7EDF\u4E0D\u4E13\u4E1A",
866
+ report: "\u4E3E\u62A5",
867
+ pornographicVulgar: "\u8272\u60C5\u4F4E\u4FD7",
868
+ politicallySensitive: "\u653F\u6CBB\u654F\u611F",
869
+ illegalCriminal: "\u8FDD\u6CD5\u72AF\u7F6A",
870
+ discriminationPrejudice: "\u6B67\u89C6\u6216\u504F\u89C1\u56DE\u7B54",
871
+ violationPrivacy: "\u4FB5\u72AF\u9690\u79C1",
872
+ contentInfringement: "\u5185\u5BB9\u4FB5\u6743",
873
+ placeholder: "\u8BF7\u8F93\u5165"
847
874
  }
848
875
  },
849
876
  // runTime