@ibiz-template/vue3-components 0.7.9 → 0.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-GoU343c8.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-Vch7U079.js +1 -0
- package/dist/{xlsx-util-Fc3O95jH.js → xlsx-util-my1qbty8.js} +1 -1
- package/es/editor/html/html-editor.controller.mjs +11 -0
- package/es/editor/html/wang-editor/ai/ai-modules.d.ts +1 -0
- package/es/editor/html/wang-editor/ai/ai-modules.mjs +2 -2
- package/es/editor/html/wang-editor/wang-editor.mjs +0 -8
- package/lib/editor/html/html-editor.controller.cjs +11 -0
- package/lib/editor/html/wang-editor/ai/ai-modules.cjs +2 -2
- package/lib/editor/html/wang-editor/wang-editor.cjs +0 -8
- package/package.json +4 -4
- package/dist/index-GAvjatsT.js +0 -4
- package/dist/wang-editor-mq8sQSDK.js +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { EditorController, getDeACMode } from '@ibiz-template/runtime';
|
|
2
|
+
import { Boot } from '@wangeditor/editor';
|
|
3
|
+
import { AIMenu } from './wang-editor/ai/ai-modules.mjs';
|
|
2
4
|
|
|
3
5
|
"use strict";
|
|
4
6
|
var __defProp = Object.defineProperty;
|
|
@@ -83,6 +85,15 @@ class HtmlEditorController extends EditorController {
|
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
}
|
|
88
|
+
if (!window.aichartRegister) {
|
|
89
|
+
Boot.registerMenu({
|
|
90
|
+
key: "aichart",
|
|
91
|
+
factory() {
|
|
92
|
+
return new AIMenu();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
window.aichartRegister = true;
|
|
96
|
+
}
|
|
86
97
|
}
|
|
87
98
|
}
|
|
88
99
|
|
|
@@ -7,13 +7,13 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
};
|
|
8
8
|
class AIMenu {
|
|
9
9
|
constructor() {
|
|
10
|
-
// TS 语法
|
|
11
10
|
__publicField(this, "title", "AI");
|
|
11
|
+
__publicField(this, "iconSvg", '<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <text x="0" y="15" fill="black">AI</text></svg>');
|
|
12
12
|
__publicField(this, "tag", "button");
|
|
13
13
|
}
|
|
14
14
|
// 菜单是否需要激活(如选中加粗文本,“加粗”菜单会激活),用不到则返回 false
|
|
15
15
|
isActive(editor) {
|
|
16
|
-
return
|
|
16
|
+
return false;
|
|
17
17
|
}
|
|
18
18
|
// 获取菜单执行时的 value ,用不到则返回空 字符串或 false
|
|
19
19
|
getValue(editor) {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { ref, shallowRef, watch, onBeforeUnmount, nextTick, onMounted, createTextVNode, createVNode, onUnmounted, resolveComponent, defineComponent } from 'vue';
|
|
2
2
|
import { Toolbar, Editor } from '@wangeditor/editor-for-vue';
|
|
3
|
-
import { Boot } from '@wangeditor/editor';
|
|
4
3
|
import { getCookie, createUUID } from 'qx-util';
|
|
5
4
|
import { isNil } from 'ramda';
|
|
6
5
|
import { getHtmlProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
|
|
7
6
|
import { CoreConst, awaitTimeout } from '@ibiz-template/core';
|
|
8
7
|
import { ElMessageBox } from 'element-plus';
|
|
9
8
|
import './wang-editor.css';
|
|
10
|
-
import { AIMenu } from './ai/ai-modules.mjs';
|
|
11
9
|
|
|
12
10
|
"use strict";
|
|
13
11
|
const IBizHtml = /* @__PURE__ */ defineComponent({
|
|
@@ -70,12 +68,6 @@ const IBizHtml = /* @__PURE__ */ defineComponent({
|
|
|
70
68
|
const customParseLinkUrl = (url) => {
|
|
71
69
|
return url;
|
|
72
70
|
};
|
|
73
|
-
Boot.registerMenu({
|
|
74
|
-
key: "aichart",
|
|
75
|
-
factory() {
|
|
76
|
-
return new AIMenu();
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
71
|
const toolbarConfig = {
|
|
80
72
|
excludeKeys: ["group-video"],
|
|
81
73
|
insertKeys: {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var runtime = require('@ibiz-template/runtime');
|
|
4
|
+
var editor = require('@wangeditor/editor');
|
|
5
|
+
var aiModules = require('./wang-editor/ai/ai-modules.cjs');
|
|
4
6
|
|
|
5
7
|
"use strict";
|
|
6
8
|
var __defProp = Object.defineProperty;
|
|
@@ -85,6 +87,15 @@ class HtmlEditorController extends runtime.EditorController {
|
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
}
|
|
90
|
+
if (!window.aichartRegister) {
|
|
91
|
+
editor.Boot.registerMenu({
|
|
92
|
+
key: "aichart",
|
|
93
|
+
factory() {
|
|
94
|
+
return new aiModules.AIMenu();
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
window.aichartRegister = true;
|
|
98
|
+
}
|
|
88
99
|
}
|
|
89
100
|
}
|
|
90
101
|
|
|
@@ -9,13 +9,13 @@ var __publicField = (obj, key, value) => {
|
|
|
9
9
|
};
|
|
10
10
|
class AIMenu {
|
|
11
11
|
constructor() {
|
|
12
|
-
// TS 语法
|
|
13
12
|
__publicField(this, "title", "AI");
|
|
13
|
+
__publicField(this, "iconSvg", '<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <text x="0" y="15" fill="black">AI</text></svg>');
|
|
14
14
|
__publicField(this, "tag", "button");
|
|
15
15
|
}
|
|
16
16
|
// 菜单是否需要激活(如选中加粗文本,“加粗”菜单会激活),用不到则返回 false
|
|
17
17
|
isActive(editor) {
|
|
18
|
-
return
|
|
18
|
+
return false;
|
|
19
19
|
}
|
|
20
20
|
// 获取菜单执行时的 value ,用不到则返回空 字符串或 false
|
|
21
21
|
getValue(editor) {
|
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var editorForVue = require('@wangeditor/editor-for-vue');
|
|
7
|
-
var editor = require('@wangeditor/editor');
|
|
8
7
|
var qxUtil = require('qx-util');
|
|
9
8
|
var ramda = require('ramda');
|
|
10
9
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
11
10
|
var core = require('@ibiz-template/core');
|
|
12
11
|
var ElementPlus = require('element-plus');
|
|
13
12
|
require('./wang-editor.css');
|
|
14
|
-
var aiModules = require('./ai/ai-modules.cjs');
|
|
15
13
|
|
|
16
14
|
"use strict";
|
|
17
15
|
const IBizHtml = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -74,12 +72,6 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
|
|
|
74
72
|
const customParseLinkUrl = (url) => {
|
|
75
73
|
return url;
|
|
76
74
|
};
|
|
77
|
-
editor.Boot.registerMenu({
|
|
78
|
-
key: "aichart",
|
|
79
|
-
factory() {
|
|
80
|
-
return new aiModules.AIMenu();
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
75
|
const toolbarConfig = {
|
|
84
76
|
excludeKeys: ["group-video"],
|
|
85
77
|
insertKeys: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.10",
|
|
4
4
|
"description": "使用 rollup 编译 vue 组件或者 jsx",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"@ibiz-template-plugin/gantt": "0.1.3-alpha.46",
|
|
33
33
|
"@ibiz-template/core": "0.7.7-dev.0",
|
|
34
34
|
"@ibiz-template/devtool": "0.0.1-dev.6",
|
|
35
|
-
"@ibiz-template/model-helper": "0.7.
|
|
36
|
-
"@ibiz-template/runtime": "0.7.
|
|
35
|
+
"@ibiz-template/model-helper": "0.7.10",
|
|
36
|
+
"@ibiz-template/runtime": "0.7.10",
|
|
37
37
|
"@ibiz-template/theme": "^0.7.0",
|
|
38
|
-
"@ibiz-template/vue3-util": "0.7.
|
|
38
|
+
"@ibiz-template/vue3-util": "0.7.10",
|
|
39
39
|
"@ibiz-template/web-theme": "^1.1.16",
|
|
40
40
|
"@ibiz/model-core": "^0.1.25",
|
|
41
41
|
"@imengyu/vue3-context-menu": "^1.3.5",
|