@ibiz-template/vue3-components 0.7.41-alpha.45 → 0.7.41-alpha.47
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-DlU-04L2.js +1 -0
- package/dist/{index-DgqTP4Vw.js → index-B0XiEslO.js} +1 -1
- package/dist/{index-Dr0VM8iS.js → index-B6kaPJDO.js} +1 -1
- package/dist/index-BniHS_Fs.js +11 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-homqxACE.js → wang-editor-Bx-SzrX-.js} +1 -1
- package/dist/{xlsx-util-C5MBICNN.js → xlsx-util-DgYbktap.js} +1 -1
- package/es/common/button-list/button-list.css +1 -1
- package/es/control/drbar/drbar.controller.mjs +6 -1
- package/es/control/drbar/drbar.mjs +5 -5
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/drtab/drtab.controller.mjs +6 -1
- package/es/control/drtab/drtab.mjs +5 -5
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.mjs +14 -3
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.mjs +2 -2
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.state.mjs +6 -0
- package/es/editor/code/monaco-editor/monaco-editor.mjs +2 -2
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +10 -6
- package/es/index.mjs +1 -0
- package/es/locale/en/index.mjs +13 -0
- package/es/locale/zh-CN/index.mjs +13 -0
- package/es/node_modules/.pnpm/modern-screenshot@4.6.7/node_modules/modern-screenshot/dist/index.mjs +1652 -0
- package/es/util/ai-chat-util/ai-chat-util.mjs +57 -23
- package/es/util/app-util/app-util.mjs +2 -4
- package/es/util/index.mjs +1 -0
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +3 -3
- package/es/util/screen-shot-util/screen-shot/components/index.mjs +3 -0
- package/es/util/screen-shot-util/screen-shot/components/screen-shot/screen-shot.css +1 -0
- package/es/util/screen-shot-util/screen-shot/components/screen-shot/screen-shot.mjs +113 -0
- package/es/util/screen-shot-util/screen-shot/components/screen-shot-toolbar/screen-shot-toolbar.css +1 -0
- package/es/util/screen-shot-util/screen-shot/components/screen-shot-toolbar/screen-shot-toolbar.mjs +105 -0
- package/es/util/screen-shot-util/screen-shot/constant/index.mjs +172 -0
- package/es/util/screen-shot-util/screen-shot/controller/index.mjs +3 -0
- package/es/util/screen-shot-util/screen-shot/controller/screen-shot.controller.mjs +366 -0
- package/es/util/screen-shot-util/screen-shot/controller/screen-shot.store.mjs +51 -0
- package/es/util/screen-shot-util/screen-shot/icon/icon.mjs +90 -0
- package/es/util/screen-shot-util/screen-shot/icon/index.mjs +3 -0
- package/es/util/screen-shot-util/screen-shot/index.mjs +4 -0
- package/es/util/screen-shot-util/screen-shot/module/draw-arrow.mjs +109 -0
- package/es/util/screen-shot-util/screen-shot/module/draw-circle.mjs +25 -0
- package/es/util/screen-shot-util/screen-shot/module/draw-mosaic.mjs +54 -0
- package/es/util/screen-shot-util/screen-shot/module/draw-pencil.mjs +15 -0
- package/es/util/screen-shot-util/screen-shot/module/draw-rectangle.mjs +12 -0
- package/es/util/screen-shot-util/screen-shot/module/draw-text.mjs +12 -0
- package/es/util/screen-shot-util/screen-shot/module/index.mjs +8 -0
- package/es/util/screen-shot-util/screen-shot/type/index.mjs +16 -0
- package/es/util/screen-shot-util/screen-shot/util/index.mjs +8 -0
- package/es/util/screen-shot-util/screen-shot-util.mjs +67 -0
- package/es/view-engine/edit-view.engine.mjs +6 -1
- package/es/view-engine/opt-view.engine.mjs +6 -1
- package/es/web-app/main.mjs +2 -0
- package/lib/common/button-list/button-list.css +1 -1
- package/lib/control/drbar/drbar.cjs +4 -4
- package/lib/control/drbar/drbar.controller.cjs +6 -1
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/drtab/drtab.cjs +4 -4
- package/lib/control/drtab/drtab.controller.cjs +6 -1
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.cjs +2 -2
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.cjs +14 -3
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.state.cjs +6 -0
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +2 -2
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +10 -6
- package/lib/index.cjs +2 -0
- package/lib/locale/en/index.cjs +13 -0
- package/lib/locale/zh-CN/index.cjs +13 -0
- package/lib/node_modules/.pnpm/modern-screenshot@4.6.7/node_modules/modern-screenshot/dist/index.cjs +1667 -0
- package/lib/util/ai-chat-util/ai-chat-util.cjs +57 -23
- package/lib/util/app-util/app-util.cjs +2 -4
- package/lib/util/index.cjs +2 -0
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +3 -3
- package/lib/util/screen-shot-util/screen-shot/components/index.cjs +7 -0
- package/lib/util/screen-shot-util/screen-shot/components/screen-shot/screen-shot.cjs +115 -0
- package/lib/util/screen-shot-util/screen-shot/components/screen-shot/screen-shot.css +1 -0
- package/lib/util/screen-shot-util/screen-shot/components/screen-shot-toolbar/screen-shot-toolbar.cjs +107 -0
- package/lib/util/screen-shot-util/screen-shot/components/screen-shot-toolbar/screen-shot-toolbar.css +1 -0
- package/lib/util/screen-shot-util/screen-shot/constant/index.cjs +174 -0
- package/lib/util/screen-shot-util/screen-shot/controller/index.cjs +7 -0
- package/lib/util/screen-shot-util/screen-shot/controller/screen-shot.controller.cjs +368 -0
- package/lib/util/screen-shot-util/screen-shot/controller/screen-shot.store.cjs +53 -0
- package/lib/util/screen-shot-util/screen-shot/icon/icon.cjs +100 -0
- package/lib/util/screen-shot-util/screen-shot/icon/index.cjs +15 -0
- package/lib/util/screen-shot-util/screen-shot/index.cjs +8 -0
- package/lib/util/screen-shot-util/screen-shot/module/draw-arrow.cjs +111 -0
- package/lib/util/screen-shot-util/screen-shot/module/draw-circle.cjs +27 -0
- package/lib/util/screen-shot-util/screen-shot/module/draw-mosaic.cjs +56 -0
- package/lib/util/screen-shot-util/screen-shot/module/draw-pencil.cjs +18 -0
- package/lib/util/screen-shot-util/screen-shot/module/draw-rectangle.cjs +14 -0
- package/lib/util/screen-shot-util/screen-shot/module/draw-text.cjs +14 -0
- package/lib/util/screen-shot-util/screen-shot/module/index.cjs +18 -0
- package/lib/util/screen-shot-util/screen-shot/type/index.cjs +18 -0
- package/lib/util/screen-shot-util/screen-shot/util/index.cjs +10 -0
- package/lib/util/screen-shot-util/screen-shot-util.cjs +69 -0
- package/lib/view-engine/edit-view.engine.cjs +6 -1
- package/lib/view-engine/opt-view.engine.cjs +6 -1
- package/lib/web-app/main.cjs +2 -0
- package/package.json +6 -5
- package/dist/ibiz-markdown-editor-C7wR017-.js +0 -1
- package/dist/index-yLzheFmH.js +0 -11
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const getAxisColor = (imgData, x, y) => {
|
|
3
|
+
const w = imgData.width;
|
|
4
|
+
const d = imgData.data;
|
|
5
|
+
const color = [];
|
|
6
|
+
color[0] = d[4 * (y * w + x)];
|
|
7
|
+
color[1] = d[4 * (y * w + x) + 1];
|
|
8
|
+
color[2] = d[4 * (y * w + x) + 2];
|
|
9
|
+
color[3] = d[4 * (y * w + x) + 3];
|
|
10
|
+
return color;
|
|
11
|
+
};
|
|
12
|
+
const setAxisColor = (imgData, x, y, color) => {
|
|
13
|
+
const w = imgData.width;
|
|
14
|
+
const d = imgData.data;
|
|
15
|
+
d[4 * (y * w + x)] = color[0];
|
|
16
|
+
d[4 * (y * w + x) + 1] = color[1];
|
|
17
|
+
d[4 * (y * w + x) + 2] = color[2];
|
|
18
|
+
d[4 * (y * w + x) + 3] = color[3];
|
|
19
|
+
};
|
|
20
|
+
function drawMosaic(mouseX, mouseY, size, degreeOfBlur, context) {
|
|
21
|
+
const dpr = window.devicePixelRatio || 1;
|
|
22
|
+
const imgData = context.getImageData(
|
|
23
|
+
mouseX * dpr,
|
|
24
|
+
mouseY * dpr,
|
|
25
|
+
size * dpr,
|
|
26
|
+
size * dpr
|
|
27
|
+
);
|
|
28
|
+
const w = imgData.width;
|
|
29
|
+
const h = imgData.height;
|
|
30
|
+
const stepW = w / degreeOfBlur;
|
|
31
|
+
const stepH = h / degreeOfBlur;
|
|
32
|
+
for (let i = 0; i < stepH; i++) {
|
|
33
|
+
for (let j = 0; j < stepW; j++) {
|
|
34
|
+
const color = getAxisColor(
|
|
35
|
+
imgData,
|
|
36
|
+
j * degreeOfBlur + Math.floor(Math.random() * degreeOfBlur),
|
|
37
|
+
i * degreeOfBlur + Math.floor(Math.random() * degreeOfBlur)
|
|
38
|
+
);
|
|
39
|
+
for (let k = 0; k < degreeOfBlur; k++) {
|
|
40
|
+
for (let l = 0; l < degreeOfBlur; l++) {
|
|
41
|
+
setAxisColor(
|
|
42
|
+
imgData,
|
|
43
|
+
j * degreeOfBlur + l,
|
|
44
|
+
i * degreeOfBlur + k,
|
|
45
|
+
color
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
context.putImageData(imgData, mouseX * dpr, mouseY * dpr);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { drawMosaic };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function initPencil(context, mouseX, mouseY) {
|
|
3
|
+
context.beginPath();
|
|
4
|
+
context.moveTo(mouseX, mouseY);
|
|
5
|
+
}
|
|
6
|
+
function drawPencil(context, mouseX, mouseY, size, color) {
|
|
7
|
+
context.save();
|
|
8
|
+
context.lineWidth = size;
|
|
9
|
+
context.strokeStyle = color;
|
|
10
|
+
context.lineTo(mouseX, mouseY);
|
|
11
|
+
context.stroke();
|
|
12
|
+
context.restore();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { drawPencil, initPencil };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function drawRectangle(mouseX, mouseY, width, height, color, borderWidth, context) {
|
|
3
|
+
context.save();
|
|
4
|
+
context.strokeStyle = color;
|
|
5
|
+
context.lineWidth = borderWidth;
|
|
6
|
+
context.beginPath();
|
|
7
|
+
context.rect(mouseX, mouseY, width, height);
|
|
8
|
+
context.stroke();
|
|
9
|
+
context.restore();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { drawRectangle };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function drawText(text, mouseX, mouseY, color, fontSize, context) {
|
|
3
|
+
context.save();
|
|
4
|
+
context.lineWidth = 1;
|
|
5
|
+
context.fillStyle = color;
|
|
6
|
+
context.textBaseline = "middle";
|
|
7
|
+
context.font = "bold ".concat(fontSize, "px none");
|
|
8
|
+
context.fillText(text, mouseX, mouseY);
|
|
9
|
+
context.restore();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { drawText };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { drawPencil, initPencil } from './draw-pencil.mjs';
|
|
2
|
+
export { drawText } from './draw-text.mjs';
|
|
3
|
+
export { DrawArrow } from './draw-arrow.mjs';
|
|
4
|
+
export { drawCircle } from './draw-circle.mjs';
|
|
5
|
+
export { drawMosaic } from './draw-mosaic.mjs';
|
|
6
|
+
export { drawRectangle } from './draw-rectangle.mjs';
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var ToolbarItemType = /* @__PURE__ */ ((ToolbarItemType2) => {
|
|
3
|
+
ToolbarItemType2["BRUSH"] = "brush";
|
|
4
|
+
ToolbarItemType2["RECT"] = "rect";
|
|
5
|
+
ToolbarItemType2["CIRCLE"] = "circle";
|
|
6
|
+
ToolbarItemType2["MARKER"] = "marker";
|
|
7
|
+
ToolbarItemType2["TEXT"] = "text";
|
|
8
|
+
ToolbarItemType2["ARROW"] = "arrow";
|
|
9
|
+
ToolbarItemType2["DIVIDER"] = "divider";
|
|
10
|
+
ToolbarItemType2["AI"] = "ai";
|
|
11
|
+
ToolbarItemType2["MOSAIC"] = "mosaic";
|
|
12
|
+
ToolbarItemType2["DRAWDOWN"] = "drawdown";
|
|
13
|
+
return ToolbarItemType2;
|
|
14
|
+
})(ToolbarItemType || {});
|
|
15
|
+
|
|
16
|
+
export { ToolbarItemType };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createApp } from 'vue';
|
|
2
|
+
import './screen-shot/index.mjs';
|
|
3
|
+
import { ScreenShot } from './screen-shot/components/screen-shot/screen-shot.mjs';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class ScreenShotUtil {
|
|
13
|
+
/**
|
|
14
|
+
* Creates an instance of ScreenShotUtil.
|
|
15
|
+
* @memberof ScreenShotUtil
|
|
16
|
+
*/
|
|
17
|
+
constructor() {
|
|
18
|
+
__publicField(this, "currentApp", null);
|
|
19
|
+
__publicField(this, "container", null);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @description 销毁组件实例
|
|
23
|
+
* @private
|
|
24
|
+
* @memberof ScreenShotUtil
|
|
25
|
+
*/
|
|
26
|
+
destroyComponent() {
|
|
27
|
+
if (this.currentApp && this.container) {
|
|
28
|
+
this.currentApp.unmount();
|
|
29
|
+
this.currentApp = null;
|
|
30
|
+
}
|
|
31
|
+
if (this.container && document.body.contains(this.container)) {
|
|
32
|
+
document.body.removeChild(this.container);
|
|
33
|
+
this.container = null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @description 开始截图
|
|
38
|
+
* @param {HTMLElement} element 需要截图的元素
|
|
39
|
+
* @param {{ container?: HTMLElement; itemClassName?: string }} opts 如果需针对dom内部滚动容器截图,则需配置:滚动容器,滚动容器项类名,用以排除非可视区元素
|
|
40
|
+
* @returns {*} {(Promise<string | undefined>)} 图片(png格式) base64 字符串
|
|
41
|
+
* @memberof ScreenShotUtil
|
|
42
|
+
*/
|
|
43
|
+
async onScreenShot(element, opts) {
|
|
44
|
+
this.destroyComponent();
|
|
45
|
+
const { container, itemClassName } = opts;
|
|
46
|
+
return new Promise((resolve) => {
|
|
47
|
+
this.container = document.createElement("div");
|
|
48
|
+
document.body.appendChild(this.container);
|
|
49
|
+
this.currentApp = createApp(ScreenShot, {
|
|
50
|
+
element,
|
|
51
|
+
container,
|
|
52
|
+
itemClassName,
|
|
53
|
+
onComplete: (base64) => {
|
|
54
|
+
this.destroyComponent();
|
|
55
|
+
resolve(base64);
|
|
56
|
+
},
|
|
57
|
+
onCancel: () => {
|
|
58
|
+
this.destroyComponent();
|
|
59
|
+
resolve(void 0);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
this.currentApp.mount(this.container);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { ScreenShotUtil };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isNil } from 'ramda';
|
|
1
2
|
import { RuntimeError } from '@ibiz-template/core';
|
|
2
3
|
import { DEMainViewEngine, getControl, getControlsByView, calcDeCodeNameById, SysUIActionTag, ViewCallTag, ControlVO, getAppViewRef, OpenAppViewCommand, calcDynaSysParams, getDeDataMajorField, convertNavData } from '@ibiz-template/runtime';
|
|
3
4
|
|
|
@@ -121,7 +122,11 @@ class EditViewEngine extends DEMainViewEngine {
|
|
|
121
122
|
const data = event.data[0];
|
|
122
123
|
this.view.state.srfactiveviewdata = data;
|
|
123
124
|
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
124
|
-
|
|
125
|
+
if (data.srfreadonly) {
|
|
126
|
+
this.view.context.srfreadonly = true;
|
|
127
|
+
} else if (isNil(this.view.context.srfreadonly)) {
|
|
128
|
+
this.view.context.srfreadonly = false;
|
|
129
|
+
}
|
|
125
130
|
}
|
|
126
131
|
evt.emit("onDataChange", { ...event, actionType: "LOAD" });
|
|
127
132
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViewEngineBase, getControl, getControlsByView, SysUIActionTag, ViewCallTag } from '@ibiz-template/runtime';
|
|
2
|
+
import { isNil } from 'ramda';
|
|
2
3
|
|
|
3
4
|
"use strict";
|
|
4
5
|
class OptViewEngine extends ViewEngineBase {
|
|
@@ -77,7 +78,11 @@ class OptViewEngine extends ViewEngineBase {
|
|
|
77
78
|
const data = event.data[0];
|
|
78
79
|
this.view.state.srfactiveviewdata = data;
|
|
79
80
|
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
80
|
-
|
|
81
|
+
if (data.srfreadonly) {
|
|
82
|
+
this.view.context.srfreadonly = true;
|
|
83
|
+
} else if (isNil(this.view.context.srfreadonly)) {
|
|
84
|
+
this.view.context.srfreadonly = false;
|
|
85
|
+
}
|
|
81
86
|
}
|
|
82
87
|
formDataStateChange(event);
|
|
83
88
|
});
|
package/es/web-app/main.mjs
CHANGED
|
@@ -22,6 +22,7 @@ import { LoadingUtil } from '../util/loading-util/loading-util.mjs';
|
|
|
22
22
|
import { NoticeUtil } from '../util/notice-util/notice-util.mjs';
|
|
23
23
|
import { OverlayController } from '../util/overlay-controller/overlay-controller.mjs';
|
|
24
24
|
import { InLineAIUtil } from '../util/inline-ai-util/inline-ai-util.mjs';
|
|
25
|
+
import { ScreenShotUtil } from '../util/screen-shot-util/screen-shot-util.mjs';
|
|
25
26
|
import { AIChatUtil } from '../util/ai-chat-util/ai-chat-util.mjs';
|
|
26
27
|
import { FullscreenUtil } from '../util/fullscreen/fullscreen-util.mjs';
|
|
27
28
|
|
|
@@ -84,6 +85,7 @@ async function runApp(plugins, opts) {
|
|
|
84
85
|
ibiz.notice = new NoticeUtil();
|
|
85
86
|
ibiz.overlay = new OverlayController();
|
|
86
87
|
ibiz.inLineAIUtil = new InLineAIUtil();
|
|
88
|
+
ibiz.screenShotUtil = new ScreenShotUtil();
|
|
87
89
|
ibiz.aiChatUtil = new AIChatUtil();
|
|
88
90
|
ibiz.util.text.format = (value, code) => {
|
|
89
91
|
return app.config.globalProperties.$textFormat(value, code);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-button-list{--ibiz-button-list-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-button-list-icon-size:var(--ibiz-width-icon-medium);--ibiz-button-list-popover-bg:var(--ibiz-color-bg-3);--ibiz-button-list-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-button-list-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-button-list-popover-button-margin:var(--ibiz-spacing-none);--ibiz-button-list-popover-button-size:var(--ibiz-height-control-large);--ibiz-button-list-popover-button-font-size:var(--ibiz-font-size-regular);--ibiz-button-list-gap:var(--ibiz-spacing-base-tight)}.ibiz-button-list__content{display:flex}.ibiz-button-list__content .ibiz-button-list__dropdown{width:auto}.ibiz-button-list__content .el-button+.el-dropdown{margin-left:var(--ibiz-button-list-gap)}.ibiz-button-list__button-content{display:flex;gap:var(--ibiz-spacing-extra-tight);align-items:center;width:100%}.ibiz-button-list__button-content--icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-button-list-icon-size);height:var(--ibiz-button-list-icon-size);margin-right:var(--ibiz-button-list-icon-margin);font-size:var(--ibiz-button-list-icon-size)}.ibiz-button-list__item>span{width:100%;pointer-events:none}.ibiz-button-list__item--group>span{display:flex;justify-content:space-between}.ibiz-button-list__item--group-icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-button-list-icon-size);height:var(--ibiz-button-list-icon-size);margin-left:var(--ibiz-button-list-icon-margin);font-size:var(--ibiz-button-list-icon-size)}.ibiz-button-list__dropdown{width:100%;height:100%}.ibiz-button-list__dropdown .ibiz-icon{margin-right:0}.ibiz-button-list__dropdown .ibiz-icon+.ibiz-button-list__button-content--caption{margin-left:var(--ibiz-button-list-icon-margin)}.ibiz-button-list__dropdown .el-button-group{display:flex;width:100%;height:100%;border-radius:var(--ibiz-border-radius-small)}.ibiz-button-list__dropdown .el-button-group .el-button:first-child{flex-grow:1}.ibiz-button-list__dropdown .el-button-group .el-button:last-child{flex-shrink:0}.ibiz-button-list__dropdown--style2 .el-button{--el-button-active-bg-color:transparent;--el-button-bg-color:transparent;--el-mask-color-extra-light:transparent;--el-button-hover-bg-color:transparent}.ibiz-button-list__dropdown--style2 .el-button-group .ibiz-button-list__item{padding-right:0}.ibiz-button-list__dropdown--style2 .el-button-group .el-button{color:var(--ibiz-color-text-2)}.ibiz-button-list__dropdown--style2 .el-button-group:hover .el-button{color:var(--ibiz-color-primary)}.ibiz-button-list--itemx .ibiz-button-list__more-button{width:32px;padding-right:0;padding-left:0}.ibiz-button-list__dropdown-popper{--ibiz-button-list-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-button-list-icon-size:var(--ibiz-width-icon-medium);--ibiz-button-list-popover-bg:var(--ibiz-color-bg-3);--ibiz-button-list-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-button-list-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-button-list-popover-button-margin:var(--ibiz-spacing-none);--ibiz-button-list-popover-button-size:var(--ibiz-height-control-large);--ibiz-button-list-popover-button-font-size:var(--ibiz-font-size-regular);--ibiz-button-list-gap:var(--ibiz-spacing-base-tight)}.ibiz-button-list__dropdown-popper>.el-scrollbar{min-width:150px;overflow:visible}.ibiz-button-list__dropdown-popper
|
|
1
|
+
.ibiz-button-list{--ibiz-button-list-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-button-list-icon-size:var(--ibiz-width-icon-medium);--ibiz-button-list-popover-bg:var(--ibiz-color-bg-3);--ibiz-button-list-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-button-list-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-button-list-popover-button-margin:var(--ibiz-spacing-none);--ibiz-button-list-popover-button-size:var(--ibiz-height-control-large);--ibiz-button-list-popover-button-font-size:var(--ibiz-font-size-regular);--ibiz-button-list-gap:var(--ibiz-spacing-base-tight)}.ibiz-button-list__content{display:flex}.ibiz-button-list__content .ibiz-button-list__dropdown{width:auto}.ibiz-button-list__content .el-button+.el-dropdown{margin-left:var(--ibiz-button-list-gap)}.ibiz-button-list__button-content{display:flex;gap:var(--ibiz-spacing-extra-tight);align-items:center;width:100%}.ibiz-button-list__button-content--icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-button-list-icon-size);height:var(--ibiz-button-list-icon-size);margin-right:var(--ibiz-button-list-icon-margin);font-size:var(--ibiz-button-list-icon-size)}.ibiz-button-list__item>span{width:100%;pointer-events:none}.ibiz-button-list__item--group>span{display:flex;justify-content:space-between}.ibiz-button-list__item--group-icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-button-list-icon-size);height:var(--ibiz-button-list-icon-size);margin-left:var(--ibiz-button-list-icon-margin);font-size:var(--ibiz-button-list-icon-size)}.ibiz-button-list__dropdown{width:100%;height:100%}.ibiz-button-list__dropdown .ibiz-icon{margin-right:0}.ibiz-button-list__dropdown .ibiz-icon+.ibiz-button-list__button-content--caption{margin-left:var(--ibiz-button-list-icon-margin)}.ibiz-button-list__dropdown .el-button-group{display:flex;width:100%;height:100%;border-radius:var(--ibiz-border-radius-small)}.ibiz-button-list__dropdown .el-button-group .el-button:first-child{flex-grow:1}.ibiz-button-list__dropdown .el-button-group .el-button:last-child{flex-shrink:0}.ibiz-button-list__dropdown--style2 .el-button{--el-button-active-bg-color:transparent;--el-button-bg-color:transparent;--el-mask-color-extra-light:transparent;--el-button-hover-bg-color:transparent}.ibiz-button-list__dropdown--style2 .el-button-group .ibiz-button-list__item{padding-right:0}.ibiz-button-list__dropdown--style2 .el-button-group .el-button{color:var(--ibiz-color-text-2)}.ibiz-button-list__dropdown--style2 .el-button-group:hover .el-button{color:var(--ibiz-color-primary)}.ibiz-button-list--itemx .ibiz-button-list__more-button{width:32px;padding-right:0;padding-left:0}.ibiz-button-list__dropdown-popper{--ibiz-button-list-icon-margin:var(--ibiz-spacing-extra-tight);--ibiz-button-list-icon-size:var(--ibiz-width-icon-medium);--ibiz-button-list-popover-bg:var(--ibiz-color-bg-3);--ibiz-button-list-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-button-list-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-button-list-popover-button-margin:var(--ibiz-spacing-none);--ibiz-button-list-popover-button-size:var(--ibiz-height-control-large);--ibiz-button-list-popover-button-font-size:var(--ibiz-font-size-regular);--ibiz-button-list-gap:var(--ibiz-spacing-base-tight)}.ibiz-button-list__dropdown-popper>.el-scrollbar{min-width:150px;overflow:visible}.ibiz-button-list__dropdown-popper-content{padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none)}.ibiz-button-list__popover{padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none)!important;border-radius:0!important}.ibiz-button-list__dropdown-popper-content,.ibiz-button-list__popover{display:flex;flex-direction:column;background-color:var(--ibiz-color-primary)!important}.ibiz-button-list__dropdown-popper-content .el-button,.ibiz-button-list__popover .el-button{justify-content:flex-start;width:100%;height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);margin:var(--ibiz-spacing-none);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-color-primary-text)}.ibiz-button-list__dropdown-popper-content .el-button ion-icon,.ibiz-button-list__popover .el-button ion-icon{margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-button-list__dropdown-popper-content .el-button.is-text:not(.is-disabled):hover,.ibiz-button-list__popover .el-button.is-text:not(.is-disabled):hover{background-color:var(--el-button-hover-bg-color);border-color:var(--el-button-hover-border-color)}.ibiz-button-list__dropdown-popper--style2 .el-scrollbar .el-dropdown__list,.ibiz-button-list__dropdown-popper--style2 .ibiz-button-list__dropdown-popper-content{background-color:transparent!important}.ibiz-button-list__dropdown-popper--style2 .el-button{color:var(--ibiz-color-text-2);background-color:transparent;border-radius:0}.ibiz-button-list__dropdown-popper--style2 .el-button.is-text:not(.is-disabled):hover{background-color:var(--ibiz-color-bg-0);border-color:transparent}
|
|
@@ -65,9 +65,9 @@ const DRBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
65
65
|
const c = vue3Util.useControlController((...args) => new drbar_controller.DRBarController(...args));
|
|
66
66
|
const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
67
67
|
const router = vueRouter.useRouter();
|
|
68
|
-
const counterData = vue.
|
|
68
|
+
const counterData = vue.ref({});
|
|
69
69
|
const fn = (counter) => {
|
|
70
|
-
|
|
70
|
+
counterData.value = counter;
|
|
71
71
|
};
|
|
72
72
|
c.evt.on("onCreated", () => {
|
|
73
73
|
if (c.counter) {
|
|
@@ -159,9 +159,9 @@ const DRBarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
159
159
|
default: () => [vue.createVNode(vue.resolveComponent("iBizIcon"), {
|
|
160
160
|
"class": ns.e("icon"),
|
|
161
161
|
"icon": item.sysImage
|
|
162
|
-
}, null), vue.createVNode("span", null, [item.caption]), item.counterId && counterData[item.counterId] != null && vue.createVNode(vue.resolveComponent("iBizBadge"), {
|
|
162
|
+
}, null), vue.createVNode("span", null, [item.caption]), item.counterId && counterData.value[item.counterId] != null && vue.createVNode(vue.resolveComponent("iBizBadge"), {
|
|
163
163
|
"class": ns.e("counter"),
|
|
164
|
-
"value": counterData[item.counterId],
|
|
164
|
+
"value": counterData.value[item.counterId],
|
|
165
165
|
"counterMode": item.counterMode
|
|
166
166
|
}, null)]
|
|
167
167
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var runtime = require('@ibiz-template/runtime');
|
|
4
|
+
var ramda = require('ramda');
|
|
4
5
|
|
|
5
6
|
"use strict";
|
|
6
7
|
var __defProp = Object.defineProperty;
|
|
@@ -255,7 +256,11 @@ class DRBarController extends runtime.ControlController {
|
|
|
255
256
|
const data = event.data[0];
|
|
256
257
|
this.view.state.srfactiveviewdata = data;
|
|
257
258
|
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
258
|
-
|
|
259
|
+
if (data.srfreadonly) {
|
|
260
|
+
this.view.context.srfreadonly = true;
|
|
261
|
+
} else if (ramda.isNil(this.view.context.srfreadonly)) {
|
|
262
|
+
this.view.context.srfreadonly = false;
|
|
263
|
+
}
|
|
259
264
|
}
|
|
260
265
|
await this.calcDrBarItemsState();
|
|
261
266
|
this.handleFormChange();
|
|
@@ -41,7 +41,7 @@ function useAppDRTab(c, controlRef, counterData) {
|
|
|
41
41
|
drTabPages.forEach((tab, index) => {
|
|
42
42
|
if (!tab.hidden) {
|
|
43
43
|
const caption = tab.caption || "";
|
|
44
|
-
const counterNum = tab.counterId ? counterData[tab.counterId] : void 0;
|
|
44
|
+
const counterNum = tab.counterId ? counterData.value[tab.counterId] : void 0;
|
|
45
45
|
const fontSize = "var(--".concat(namespace.defaultNamespace, "-font-size-regular)");
|
|
46
46
|
if (counterNum != null && !(!counterNum && counterNum !== 0) && !(tab.counterMode === 1 && counterNum <= 0)) {
|
|
47
47
|
const counterStyle = {
|
|
@@ -57,13 +57,13 @@ const DRTabControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
57
57
|
const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
58
58
|
const router = vueRouter.useRouter();
|
|
59
59
|
const controlRef = vue.ref();
|
|
60
|
-
const counterData = vue.
|
|
60
|
+
const counterData = vue.ref({});
|
|
61
61
|
const {
|
|
62
62
|
visibleItems,
|
|
63
63
|
moreItems
|
|
64
64
|
} = drtabControl_util.useAppDRTab(c, controlRef, counterData);
|
|
65
65
|
const fn = (counter) => {
|
|
66
|
-
|
|
66
|
+
counterData.value = counter;
|
|
67
67
|
};
|
|
68
68
|
const tabPosition = ((_a = c.view.model.tabLayout) == null ? void 0 : _a.toLowerCase()) || "top";
|
|
69
69
|
c.evt.on("onCreated", () => {
|
|
@@ -150,7 +150,7 @@ const DRTabControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
150
150
|
}, null), vue.createVNode("div", {
|
|
151
151
|
"class": "caption"
|
|
152
152
|
}, [(_b = activeTab.value) == null ? void 0 : _b.caption, ((_c = activeTab.value) == null ? void 0 : _c.counterId) && vue.createVNode(vue.resolveComponent("iBizBadge"), {
|
|
153
|
-
"value": counterData[activeTab.value.counterId],
|
|
153
|
+
"value": counterData.value[activeTab.value.counterId],
|
|
154
154
|
"counterMode": activeTab.value.counterMode
|
|
155
155
|
}, null)]), vue.createVNode("ion-icon", {
|
|
156
156
|
"name": "chevron-down-outline"
|
|
@@ -171,7 +171,7 @@ const DRTabControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
171
171
|
}, null), vue.createVNode("span", {
|
|
172
172
|
"class": "caption"
|
|
173
173
|
}, [tab.caption]), tab.counterId && vue.createVNode(vue.resolveComponent("iBizBadge"), {
|
|
174
|
-
"value": counterData[tab.counterId],
|
|
174
|
+
"value": counterData.value[tab.counterId],
|
|
175
175
|
"counterMode": tab.counterMode
|
|
176
176
|
}, null), tab.tag === c.state.activeName && vue.createVNode("ion-icon", {
|
|
177
177
|
"name": "checkmark-outline"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var qxUtil = require('qx-util');
|
|
4
4
|
var runtime = require('@ibiz-template/runtime');
|
|
5
5
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
+
var ramda = require('ramda');
|
|
6
7
|
|
|
7
8
|
"use strict";
|
|
8
9
|
var __defProp = Object.defineProperty;
|
|
@@ -272,7 +273,11 @@ class DRTabController extends runtime.ControlController {
|
|
|
272
273
|
const data = event.data[0];
|
|
273
274
|
this.view.state.srfactiveviewdata = data;
|
|
274
275
|
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
275
|
-
|
|
276
|
+
if (data.srfreadonly) {
|
|
277
|
+
this.view.context.srfreadonly = true;
|
|
278
|
+
} else if (ramda.isNil(this.view.context.srfreadonly)) {
|
|
279
|
+
this.view.context.srfreadonly = false;
|
|
280
|
+
}
|
|
276
281
|
}
|
|
277
282
|
await this.calcDrTabPagesState();
|
|
278
283
|
this.handleFormChange();
|
package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.cjs
CHANGED
|
@@ -27,8 +27,8 @@ const CompositeFormItemEx = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
27
|
const ns = vue3Util.useNamespace("form-item");
|
|
28
28
|
const ns2 = vue3Util.useNamespace("composite-form-item-ex");
|
|
29
29
|
const c = props.controller;
|
|
30
|
-
const onValueChange = (val,
|
|
31
|
-
props.controller.setDataValue(val, name, ignore);
|
|
30
|
+
const onValueChange = (val, _name, ignore = false) => {
|
|
31
|
+
props.controller.setDataValue(val, c.name, ignore);
|
|
32
32
|
};
|
|
33
33
|
const loading = vue.ref(true);
|
|
34
34
|
const editorRef = vue.ref();
|
|
@@ -34,7 +34,7 @@ class CompositeFormItemExController extends runtime.FormItemController {
|
|
|
34
34
|
__publicField(this, "codeListId", "");
|
|
35
35
|
/**
|
|
36
36
|
* @description 切换菜单选项
|
|
37
|
-
* @type {{ id: string; name: string; icon?: ISysImage, editor?: IData }[]}
|
|
37
|
+
* @type {{ id: string; name: string; icon?: ISysImage, editor?: IData, valueItem?: string }[]}
|
|
38
38
|
* @memberof CompositeFormItemExController
|
|
39
39
|
*/
|
|
40
40
|
__publicField(this, "switchOptions", []);
|
|
@@ -49,6 +49,16 @@ class CompositeFormItemExController extends runtime.FormItemController {
|
|
|
49
49
|
var _a;
|
|
50
50
|
return new compositeFormItemEx_state.CompositeFormItemExState((_a = this.parent) == null ? void 0 : _a.state);
|
|
51
51
|
}
|
|
52
|
+
get name() {
|
|
53
|
+
return this.state.editorValueItem || this.model.id;
|
|
54
|
+
}
|
|
55
|
+
get value() {
|
|
56
|
+
var _a;
|
|
57
|
+
const option = this.switchOptions.find(
|
|
58
|
+
(item) => item.id === this.state.editorId
|
|
59
|
+
);
|
|
60
|
+
return (_a = this.data) == null ? void 0 : _a[(option == null ? void 0 : option.valueItem) || this.model.id];
|
|
61
|
+
}
|
|
52
62
|
async onInit() {
|
|
53
63
|
var _a, _b, _c, _d;
|
|
54
64
|
await super.onInit();
|
|
@@ -73,7 +83,8 @@ class CompositeFormItemExController extends runtime.FormItemController {
|
|
|
73
83
|
id: item.value,
|
|
74
84
|
name: item.text,
|
|
75
85
|
icon: item.sysImage,
|
|
76
|
-
editor: item.data
|
|
86
|
+
editor: item.data,
|
|
87
|
+
valueItem: item.userData
|
|
77
88
|
};
|
|
78
89
|
});
|
|
79
90
|
this.defaultType = ((_b = this.switchOptions[0]) == null ? void 0 : _b.id) || "";
|
|
@@ -104,6 +115,7 @@ class CompositeFormItemExController extends runtime.FormItemController {
|
|
|
104
115
|
if (!option) {
|
|
105
116
|
return;
|
|
106
117
|
}
|
|
118
|
+
this.state.editorValueItem = option.valueItem || "";
|
|
107
119
|
const editorModel = {
|
|
108
120
|
...this.createEditorModel(),
|
|
109
121
|
...option.editor
|
|
@@ -149,7 +161,6 @@ class CompositeFormItemExController extends runtime.FormItemController {
|
|
|
149
161
|
if (!id || id === this.state.editorId) {
|
|
150
162
|
return;
|
|
151
163
|
}
|
|
152
|
-
this.setDataValue("", this.name);
|
|
153
164
|
if (this.valueItem && this.valueItem.id) {
|
|
154
165
|
this.setDataValue(id, this.valueItem.id);
|
|
155
166
|
}
|
|
@@ -18,6 +18,12 @@ class CompositeFormItemExState extends runtime.FormItemState {
|
|
|
18
18
|
* @memberof CompositeFormItemExState
|
|
19
19
|
*/
|
|
20
20
|
__publicField(this, "editorId", "");
|
|
21
|
+
/**
|
|
22
|
+
* @description 当前选中的编辑器值项
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof CompositeFormItemExState
|
|
25
|
+
*/
|
|
26
|
+
__publicField(this, "editorValueItem", "");
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
29
|
|
|
@@ -268,7 +268,7 @@ const IBizCode = /* @__PURE__ */ vue.defineComponent({
|
|
|
268
268
|
// 不要滚动条的边框
|
|
269
269
|
});
|
|
270
270
|
editor.__instanceId = UUID;
|
|
271
|
-
if (c.
|
|
271
|
+
if (c.chatCompletion && ibiz.env.enableAI) {
|
|
272
272
|
codeLensProviderDisposable = loaderMonaco.languages.registerCodeLensProvider(props.language || props.controller.language, {
|
|
273
273
|
provideCodeLenses: function(model, _token) {
|
|
274
274
|
if (!validate(model))
|
|
@@ -451,7 +451,7 @@ const IBizCode = /* @__PURE__ */ vue.defineComponent({
|
|
|
451
451
|
}, null);
|
|
452
452
|
};
|
|
453
453
|
const renderTextEditorToolbar = () => {
|
|
454
|
-
if (!textTBVisible.value)
|
|
454
|
+
if (!textTBVisible.value || !c.chatCompletion)
|
|
455
455
|
return null;
|
|
456
456
|
return vue.createVNode("div", {
|
|
457
457
|
"ref": "textTBRef",
|
|
@@ -19,7 +19,7 @@ const IBizMarkDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
19
|
emit,
|
|
20
20
|
slots
|
|
21
21
|
}) {
|
|
22
|
-
var _a, _b, _c, _d, _e;
|
|
22
|
+
var _a, _b, _c, _d, _e, _f;
|
|
23
23
|
const ns = vue3Util.useNamespace("markdown");
|
|
24
24
|
const c = props.controller;
|
|
25
25
|
const currentVal = vue.ref("");
|
|
@@ -55,8 +55,12 @@ const IBizMarkDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
55
55
|
const lastDirectoryState = vue.ref("pure");
|
|
56
56
|
let isIgnoreChange = false;
|
|
57
57
|
let chatInstance;
|
|
58
|
+
let disabledirectory = false;
|
|
59
|
+
if ((_e = c == null ? void 0 : c.editorParams) == null ? void 0 : _e.disabledirectory) {
|
|
60
|
+
disabledirectory = c.editorParams.disabledirectory === "true";
|
|
61
|
+
}
|
|
58
62
|
let tocPos = "absolute";
|
|
59
|
-
if ((
|
|
63
|
+
if ((_f = c == null ? void 0 : c.editorParams) == null ? void 0 : _f.tocpos) {
|
|
60
64
|
tocPos = c.editorParams.tocpos === "fixed" ? "fixed" : "absolute";
|
|
61
65
|
}
|
|
62
66
|
const [AIMenu, AIChart] = customMenu.initCustomMenu(c, {
|
|
@@ -278,7 +282,7 @@ const IBizMarkDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
278
282
|
defaultModel.value = "previewOnly";
|
|
279
283
|
}
|
|
280
284
|
vue.nextTick(() => {
|
|
281
|
-
var _a2;
|
|
285
|
+
var _a2, _b2, _c2;
|
|
282
286
|
const bubble = ["bold", "italic", "underline", "strikethrough", "sub", "sup", "|", "size", "color"];
|
|
283
287
|
const toolbar = ["bold", "italic", "underline", "strikethrough", "|", "color", "header", "|", "list", "image", {
|
|
284
288
|
insert: ["link", "hr", "br", "code", "formula", "toc", "table", "line-table", "bar-table"]
|
|
@@ -332,7 +336,7 @@ const IBizMarkDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
332
336
|
// 定义顶部右侧工具栏,默认为空
|
|
333
337
|
toolbarRight: [],
|
|
334
338
|
// 目录
|
|
335
|
-
toc: {
|
|
339
|
+
toc: !disabledirectory && {
|
|
336
340
|
updateLocationHash: false,
|
|
337
341
|
// 要不要更新URL的hash
|
|
338
342
|
defaultModel: "pure",
|
|
@@ -365,7 +369,7 @@ const IBizMarkDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
365
369
|
editor.toggleToc("pure");
|
|
366
370
|
const html = editor.engine.makeHtml(currentVal.value);
|
|
367
371
|
editor.previewer.update(html);
|
|
368
|
-
editor.toc.updateTocList();
|
|
372
|
+
(_b2 = (_a2 = editor.toc) == null ? void 0 : _a2.updateTocList) == null ? void 0 : _b2.call(_a2);
|
|
369
373
|
editor.setTheme(theme.value);
|
|
370
374
|
if (customTheme) {
|
|
371
375
|
editor.setTheme(customTheme);
|
|
@@ -375,7 +379,7 @@ const IBizMarkDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
375
379
|
span.title = ibiz.i18n.t("editor.common.fullscreen");
|
|
376
380
|
span.onclick = onSwitchFullscreen;
|
|
377
381
|
span.appendChild(createCherryIcon("fullscreen"));
|
|
378
|
-
const parentElement = props.disabled ? editor.editor.options.editorDom.parentElement : (
|
|
382
|
+
const parentElement = props.disabled ? editor.editor.options.editorDom.parentElement : (_c2 = editor.editor.options.editorDom.parentElement) == null ? void 0 : _c2.querySelector(".cherry-toolbar>.toolbar-right");
|
|
379
383
|
parentElement == null ? void 0 : parentElement.appendChild(span);
|
|
380
384
|
c == null ? void 0 : c.setMDEditor(editor);
|
|
381
385
|
onMDEditorCreated(editor);
|
package/lib/index.cjs
CHANGED
|
@@ -183,6 +183,7 @@ var keydownUtil = require('./util/keydown-util/keydown-util.cjs');
|
|
|
183
183
|
var buttonUtil = require('./util/button-util/button-util.cjs');
|
|
184
184
|
var inlineAiUtil = require('./util/inline-ai-util/inline-ai-util.cjs');
|
|
185
185
|
var aiChatUtil = require('./util/ai-chat-util/ai-chat-util.cjs');
|
|
186
|
+
var screenShotUtil = require('./util/screen-shot-util/screen-shot-util.cjs');
|
|
186
187
|
var wangEditorUtil = require('./util/wang-editor-util/wang-editor-util.cjs');
|
|
187
188
|
var icon = require('./util/icon/icon.cjs');
|
|
188
189
|
var authGuard = require('./web-app/guard/auth-guard/auth-guard.cjs');
|
|
@@ -374,6 +375,7 @@ exports.useFocusByEnter = keydownUtil.useFocusByEnter;
|
|
|
374
375
|
exports.convertBtnType = buttonUtil.convertBtnType;
|
|
375
376
|
exports.InLineAIUtil = inlineAiUtil.InLineAIUtil;
|
|
376
377
|
exports.AIChatUtil = aiChatUtil.AIChatUtil;
|
|
378
|
+
exports.ScreenShotUtil = screenShotUtil.ScreenShotUtil;
|
|
377
379
|
exports.parseHtml = wangEditorUtil.parseHtml;
|
|
378
380
|
exports.ArrowLeftBold = icon.ArrowLeftBold;
|
|
379
381
|
exports.ArrowRightBold = icon.ArrowRightBold;
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -879,6 +879,19 @@ var index = {
|
|
|
879
879
|
violationPrivacy: "Violation of Privacy",
|
|
880
880
|
contentInfringement: "Content infringement",
|
|
881
881
|
placeholder: "Please enter"
|
|
882
|
+
},
|
|
883
|
+
screenShotUtil: {
|
|
884
|
+
prepareCanvas: "Prepare the canvas...",
|
|
885
|
+
small: "Small",
|
|
886
|
+
medium: "Medium",
|
|
887
|
+
big: "Big",
|
|
888
|
+
brush: "Brush",
|
|
889
|
+
rect: "Rect",
|
|
890
|
+
circle: "Circle",
|
|
891
|
+
mosaic: "Mosaic",
|
|
892
|
+
text: "Text",
|
|
893
|
+
arrow: "Arrow",
|
|
894
|
+
drawdown: "Drawdown"
|
|
882
895
|
}
|
|
883
896
|
},
|
|
884
897
|
// runTime
|
|
@@ -875,6 +875,19 @@ var index = {
|
|
|
875
875
|
violationPrivacy: "\u4FB5\u72AF\u9690\u79C1",
|
|
876
876
|
contentInfringement: "\u5185\u5BB9\u4FB5\u6743",
|
|
877
877
|
placeholder: "\u8BF7\u8F93\u5165"
|
|
878
|
+
},
|
|
879
|
+
screenShotUtil: {
|
|
880
|
+
prepareCanvas: "\u51C6\u5907\u753B\u5E03\u4E2D...",
|
|
881
|
+
small: "\u5C0F",
|
|
882
|
+
medium: "\u4E2D",
|
|
883
|
+
big: "\u5927",
|
|
884
|
+
brush: "\u753B\u7B14",
|
|
885
|
+
rect: "\u77E9\u5F62",
|
|
886
|
+
circle: "\u5706\u5F62",
|
|
887
|
+
mosaic: "\u9A6C\u8D5B\u514B",
|
|
888
|
+
text: "\u6587\u672C\u6CE8\u91CA",
|
|
889
|
+
arrow: "\u7BAD\u5934",
|
|
890
|
+
drawdown: "\u56DE\u64A4"
|
|
878
891
|
}
|
|
879
892
|
},
|
|
880
893
|
// runTime
|