@kp-ui/lowcode 1.0.82 → 1.0.84
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
if (typeof window !== "undefined") {
|
|
2
2
|
let loadSvg = function() {
|
|
3
3
|
var body = document.body;
|
|
4
|
-
var svgDom = document.getElementById("
|
|
4
|
+
var svgDom = document.getElementById("lowcodeDomId");
|
|
5
5
|
if (!svgDom) {
|
|
6
6
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
7
7
|
svgDom.style.position = "absolute";
|
|
8
8
|
svgDom.style.width = "0";
|
|
9
9
|
svgDom.style.height = "0";
|
|
10
|
-
svgDom.id = "
|
|
10
|
+
svgDom.id = "lowcodeDomId";
|
|
11
11
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
12
12
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
"name": "@kp-ui/lowcode",
|
|
3
|
+
"version": "1.0.84",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"module": "index.js",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@kp-ui/tool": "1.0.27",
|
|
10
|
+
"@surely-vue/table": "^5.0.3",
|
|
11
|
+
"animate.css": "^4.1.1",
|
|
12
|
+
"ant-design-vue": "3.2.20",
|
|
13
|
+
"axios": "^1.3.5",
|
|
14
|
+
"bpmn-js": "13.2.0",
|
|
15
|
+
"clipboard": "^2.0.8",
|
|
16
|
+
"core-js": "^3.6.5",
|
|
17
|
+
"dayjs": "^1.11.10",
|
|
18
|
+
"file-saver": "^2.0.5",
|
|
19
|
+
"json-bigint": "^1.0.0",
|
|
20
|
+
"lodash-es": "^4.17.21",
|
|
21
|
+
"mitt": "^3.0.0",
|
|
22
|
+
"query-string": "^9.1.1",
|
|
23
|
+
"quill": "^2.0.3",
|
|
24
|
+
"sortablejs": "1.14.0",
|
|
25
|
+
"vue": "^3.5.13"
|
|
26
|
+
},
|
|
27
|
+
"main": "index.js",
|
|
28
|
+
"types": "types/install.d.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": "./index.js",
|
|
32
|
+
"types": "./types/index.d.ts"
|
|
6
33
|
},
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"animate.css": "^4.1.1",
|
|
12
|
-
"ant-design-vue": "3.2.20",
|
|
13
|
-
"axios": "^1.3.5",
|
|
14
|
-
"bpmn-js": "13.2.0",
|
|
15
|
-
"clipboard": "^2.0.8",
|
|
16
|
-
"core-js": "^3.6.5",
|
|
17
|
-
"dayjs": "^1.11.10",
|
|
18
|
-
"file-saver": "^2.0.5",
|
|
19
|
-
"json-bigint": "^1.0.0",
|
|
20
|
-
"lodash-es": "^4.17.21",
|
|
21
|
-
"mitt": "^3.0.0",
|
|
22
|
-
"query-string": "^9.1.1",
|
|
23
|
-
"quill": "^2.0.3",
|
|
24
|
-
"sortablejs": "1.14.0",
|
|
25
|
-
"vue": "^3.5.13"
|
|
26
|
-
},
|
|
27
|
-
"main": "index.js",
|
|
28
|
-
"types": "types/install.d.d.ts",
|
|
29
|
-
"exports": {
|
|
30
|
-
".": {
|
|
31
|
-
"import": "./index.js",
|
|
32
|
-
"types": "./types/index.d.ts"
|
|
33
|
-
},
|
|
34
|
-
"./style": "./styles/style.css",
|
|
35
|
-
"./styles/*": "./styles/*",
|
|
36
|
-
"./src/*": "./src/*"
|
|
37
|
-
}
|
|
34
|
+
"./style": "./styles/style.css",
|
|
35
|
+
"./styles/*": "./styles/*",
|
|
36
|
+
"./src/*": "./src/*"
|
|
37
|
+
}
|
|
38
38
|
}
|
|
@@ -23,12 +23,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
const emit = __emit;
|
|
24
24
|
const [codeEditorRef, openCodeEditor] = useOpenAntdModal();
|
|
25
25
|
const open = (value) => {
|
|
26
|
+
console.log({ value });
|
|
26
27
|
currentCode.value = value;
|
|
27
28
|
code.value = value;
|
|
28
29
|
openCodeEditor();
|
|
29
30
|
};
|
|
30
31
|
const hanldeSave = (value) => {
|
|
31
|
-
console.log({ value });
|
|
32
32
|
emit("save", value);
|
|
33
33
|
code.value = value;
|
|
34
34
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, normalizeClass, createTextVNode, toDisplayString, unref
|
|
1
|
+
import { defineComponent, ref, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, normalizeClass, createTextVNode, toDisplayString, unref } from "vue";
|
|
2
2
|
import { useI18n } from "../../utils/i18n.js";
|
|
3
|
-
import CodeEditor from "../code-editor/index.vue.js";
|
|
4
3
|
import { message } from "ant-design-vue";
|
|
5
|
-
|
|
4
|
+
import { useOpenAntdModal, TpfCodeEditor } from "tmgc2-share";
|
|
6
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
6
|
__name: "methoad-item",
|
|
8
7
|
props: {
|
|
@@ -17,15 +16,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
16
|
const { i18nt } = useI18n();
|
|
18
17
|
const props = __props;
|
|
19
18
|
const emit = __emit;
|
|
20
|
-
const
|
|
19
|
+
const [codeEditorRef, openTpfCodeEditor] = useOpenAntdModal();
|
|
21
20
|
const formEventHandlerCode = ref("");
|
|
22
21
|
const showFormEventDialogFlag = ref(false);
|
|
23
22
|
const editFormEventHandler = (eventName) => {
|
|
24
23
|
formEventHandlerCode.value = props.formConfig[eventName];
|
|
25
|
-
|
|
24
|
+
openTpfCodeEditor();
|
|
26
25
|
};
|
|
27
26
|
const saveFormEventHandler = () => {
|
|
28
|
-
const codeHints =
|
|
27
|
+
const codeHints = codeEditorRef.value.ecEditor.getEditorAnnotations();
|
|
29
28
|
let syntaxErrorFlag = false;
|
|
30
29
|
if (!!codeHints && codeHints.length > 0) {
|
|
31
30
|
codeHints.forEach((chItem) => {
|
|
@@ -44,8 +43,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
43
|
return (_ctx, _cache) => {
|
|
45
44
|
const _component_a_button = resolveComponent("a-button");
|
|
46
45
|
const _component_a_form_item = resolveComponent("a-form-item");
|
|
47
|
-
const _component_a_alert = resolveComponent("a-alert");
|
|
48
|
-
const _component_a_modal = resolveComponent("a-modal");
|
|
49
46
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
50
47
|
createVNode(_component_a_form_item, {
|
|
51
48
|
label: _ctx.eventName,
|
|
@@ -67,61 +64,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
64
|
]),
|
|
68
65
|
_: 1
|
|
69
66
|
}, 8, ["label"]),
|
|
70
|
-
createVNode(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"destroy-on-close": true,
|
|
80
|
-
width: 800
|
|
81
|
-
}, {
|
|
82
|
-
footer: withCtx(() => [
|
|
83
|
-
createElementVNode("div", _hoisted_1, [
|
|
84
|
-
createVNode(_component_a_button, {
|
|
85
|
-
onClick: _cache[2] || (_cache[2] = ($event) => showFormEventDialogFlag.value = false)
|
|
86
|
-
}, {
|
|
87
|
-
default: withCtx(() => [
|
|
88
|
-
createTextVNode(toDisplayString(unref(i18nt)("designer.hint.cancel")), 1)
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}),
|
|
92
|
-
createVNode(_component_a_button, {
|
|
93
|
-
type: "primary",
|
|
94
|
-
onClick: saveFormEventHandler
|
|
95
|
-
}, {
|
|
96
|
-
default: withCtx(() => [
|
|
97
|
-
createTextVNode(toDisplayString(unref(i18nt)("designer.hint.confirm")), 1)
|
|
98
|
-
]),
|
|
99
|
-
_: 1
|
|
100
|
-
})
|
|
101
|
-
])
|
|
102
|
-
]),
|
|
103
|
-
default: withCtx(() => [
|
|
104
|
-
createVNode(_component_a_alert, {
|
|
105
|
-
type: "info",
|
|
106
|
-
closable: false,
|
|
107
|
-
message: "form." + _ctx.eventParamsMap[_ctx.eventName]
|
|
108
|
-
}, null, 8, ["message"]),
|
|
109
|
-
createVNode(CodeEditor, {
|
|
110
|
-
mode: "javascript",
|
|
111
|
-
readonly: false,
|
|
112
|
-
modelValue: formEventHandlerCode.value,
|
|
113
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formEventHandlerCode.value = $event),
|
|
114
|
-
ref_key: "ecEditor",
|
|
115
|
-
ref: ecEditor
|
|
116
|
-
}, null, 8, ["modelValue"]),
|
|
117
|
-
createVNode(_component_a_alert, {
|
|
118
|
-
type: "info",
|
|
119
|
-
closable: false,
|
|
120
|
-
message: "}"
|
|
121
|
-
})
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
}, 8, ["title", "visible"])
|
|
67
|
+
createVNode(unref(TpfCodeEditor), {
|
|
68
|
+
modelValue: formEventHandlerCode.value,
|
|
69
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formEventHandlerCode.value = $event),
|
|
70
|
+
mode: "javascript",
|
|
71
|
+
ref_key: "codeEditorRef",
|
|
72
|
+
ref: codeEditorRef,
|
|
73
|
+
eventHeader: "form." + _ctx.eventParamsMap[_ctx.eventName],
|
|
74
|
+
onSetCode: saveFormEventHandler
|
|
75
|
+
}, null, 8, ["modelValue", "eventHeader"])
|
|
125
76
|
], 64);
|
|
126
77
|
};
|
|
127
78
|
}
|