@kp-ui/lowcode 1.0.69 → 1.0.71
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/_virtual/virtual_svg-icons-register.js +2 -2
- package/package.json +28 -28
- package/render.js +6 -4
- package/src/components/form-designer/form-widget/field-widget/fieldMixin.js +6 -2
- package/src/components/form-designer/form-widget/index.vue.js +6 -4
- package/src/components/form-designer/setting-panel/index.vue.js +6 -4
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +5 -4
- package/src/components/form-designer/toolbar-panel/index.vue.js +9 -7
- package/src/components/form-render/dynamic-dialog.vue.js +4 -2
- package/src/utils/i18n.js +1 -32
- package/src/utils/smart-vue-i18n/index.js +32 -2
- package/stats.html +4949 -0
- package/styles/style.css +1 -1
- package/types/src/utils/i18n.d.ts.map +1 -1
- package/types/src/utils/smart-vue-i18n/index.d.ts +0 -1
- package/types/src/utils/smart-vue-i18n/index.d.ts.map +1 -1
- package/packages/tmgc2-share/src/components/TpfCodeEditor/code-editor.vue.js +0 -7
- package/packages/tmgc2-share/src/components/TpfCodeEditor/code-editor.vue2.js +0 -164
- package/packages/tmgc2-share/src/components/TpfModal/index.vue.js +0 -7
- package/packages/tmgc2-share/src/components/TpfModal/index.vue2.js +0 -173
- package/packages/tmgc2-share/src/components/TpfModal/index.vue3.js +0 -1
|
@@ -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("__svg__icons__dom__1749628779003__");
|
|
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 = "__svg__icons__dom__1749628779003__";
|
|
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,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
"name": "@kp-ui/lowcode",
|
|
3
|
+
"version": "1.0.71",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"main": "index.js",
|
|
8
|
+
"module": "index.js",
|
|
9
|
+
"types": "main.d.ts",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@element-plus/icons-vue": "^0.2.4",
|
|
12
|
+
"@kp-ui/tool": "1.0.27",
|
|
13
|
+
"@surely-vue/table": "^5.0.3",
|
|
14
|
+
"animate.css": "^4.1.1",
|
|
15
|
+
"ant-design-vue": "3.2.20",
|
|
16
|
+
"axios": "^1.3.5",
|
|
17
|
+
"bpmn-js": "13.2.0",
|
|
18
|
+
"clipboard": "^2.0.8",
|
|
19
|
+
"core-js": "^3.6.5",
|
|
20
|
+
"dayjs": "^1.11.10",
|
|
21
|
+
"file-saver": "^2.0.5",
|
|
22
|
+
"json-bigint": "^1.0.0",
|
|
23
|
+
"lodash-es": "^4.17.21",
|
|
24
|
+
"mitt": "^3.0.0",
|
|
25
|
+
"query-string": "^9.1.1",
|
|
26
|
+
"quill": "^2.0.3",
|
|
27
|
+
"sortablejs": "1.14.0",
|
|
28
|
+
"vue": "3.5.11"
|
|
29
|
+
}
|
|
30
30
|
}
|
package/render.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, normalizeStyle, withModifiers, normalizeClass, createElementBlock, Fragment, renderList, resolveDynamicComponent, createSlots, renderSlot, mergeProps, render, h } from "vue";
|
|
1
|
+
import { defineAsyncComponent, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, normalizeStyle, withModifiers, normalizeClass, createElementBlock, Fragment, renderList, resolveDynamicComponent, createSlots, renderSlot, mergeProps, render, h } from "vue";
|
|
2
2
|
import emitter from "./src/utils/emitter.js";
|
|
3
3
|
import comps from "./src/components/form-designer/form-widget/field-widget/index.js";
|
|
4
|
-
import { TpfConfigProvider } from "tmgc2-share";
|
|
5
4
|
import { buildDefaultFormJson, getContainerWidgetByName, cloneFormConfigWithoutEventHandler, deepClone, getDSByName, overwriteObj, runDataSourceRequest, getAllContainerWidgets, getAllFieldWidgets, getDefaultFormConfig, traverseFieldWidgets, getFieldWidgetByName, traverseFieldWidgetsOfContainer, insertCustomCssToHead, insertGlobalFunctionsToHtml, generateId } from "./src/utils/util.js";
|
|
6
5
|
import i18n, { changeLocale } from "./src/utils/i18n.js";
|
|
7
6
|
import DynamicDialog from "./src/components/form-render/dynamic-dialog.vue.js";
|
|
@@ -14,7 +13,10 @@ const _sfc_main = {
|
|
|
14
13
|
componentName: "VFormRender",
|
|
15
14
|
mixins: [emitter, i18n],
|
|
16
15
|
components: {
|
|
17
|
-
TpfConfigProvider
|
|
16
|
+
TpfConfigProvider: defineAsyncComponent(async () => {
|
|
17
|
+
const { TpfConfigProvider } = await import("tmgc2-share");
|
|
18
|
+
return TpfConfigProvider;
|
|
19
|
+
}),
|
|
18
20
|
...comps
|
|
19
21
|
},
|
|
20
22
|
props: {
|
|
@@ -1079,7 +1081,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1079
1081
|
_: 3
|
|
1080
1082
|
});
|
|
1081
1083
|
}
|
|
1082
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
1084
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0f77057b"]]);
|
|
1083
1085
|
export {
|
|
1084
1086
|
index as default
|
|
1085
1087
|
};
|
|
@@ -75,8 +75,12 @@ const fieldMixin = {
|
|
|
75
75
|
const { onDisabled, disabled } = this.field.options;
|
|
76
76
|
if (disabled) return true;
|
|
77
77
|
if (onDisabled) {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
try {
|
|
79
|
+
const disabledFn = new Function(onDisabled);
|
|
80
|
+
return disabledFn.call(this);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
console.log({ error });
|
|
83
|
+
}
|
|
80
84
|
}
|
|
81
85
|
return false;
|
|
82
86
|
},
|
|
@@ -2,8 +2,7 @@ import comps from "./field-widget/index.js";
|
|
|
2
2
|
import i18n from "../../../utils/i18n.js";
|
|
3
3
|
import draggableComponent from "../../../lib/vuedraggable/src/vuedraggable.js";
|
|
4
4
|
import _sfc_main$1 from "../../form-render/SubmitButtonRender.vue.js";
|
|
5
|
-
import {
|
|
6
|
-
import { resolveComponent, createBlock, openBlock, withCtx, createElementVNode, createVNode, normalizeClass, createElementBlock, createCommentVNode, toDisplayString, normalizeStyle, mergeProps, resolveDynamicComponent } from "vue";
|
|
5
|
+
import { defineAsyncComponent, resolveComponent, createBlock, openBlock, withCtx, createElementVNode, createVNode, normalizeClass, createElementBlock, createCommentVNode, toDisplayString, normalizeStyle, mergeProps, resolveDynamicComponent } from "vue";
|
|
7
6
|
/* empty css */
|
|
8
7
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
8
|
const _sfc_main = {
|
|
@@ -12,7 +11,10 @@ const _sfc_main = {
|
|
|
12
11
|
mixins: [i18n],
|
|
13
12
|
components: {
|
|
14
13
|
Draggable: draggableComponent,
|
|
15
|
-
TpfConfigProvider
|
|
14
|
+
TpfConfigProvider: defineAsyncComponent(async () => {
|
|
15
|
+
const { TpfConfigProvider } = await import("tmgc2-share");
|
|
16
|
+
return TpfConfigProvider;
|
|
17
|
+
}),
|
|
16
18
|
SubmitButtonRender: _sfc_main$1,
|
|
17
19
|
...comps
|
|
18
20
|
},
|
|
@@ -219,7 +221,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
219
221
|
_: 1
|
|
220
222
|
}, 8, ["component-size"]);
|
|
221
223
|
}
|
|
222
|
-
const VFormWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
224
|
+
const VFormWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-26ffc996"]]);
|
|
223
225
|
export {
|
|
224
226
|
VFormWidget as default
|
|
225
227
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineAsyncComponent, resolveComponent, createBlock, openBlock, withCtx, createVNode, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, createElementBlock, Fragment, renderList, resolveDynamicComponent } from "vue";
|
|
1
2
|
import CodeEditor from "../../code-editor/index.vue.js";
|
|
2
3
|
import comps from "./property-editor/index.js";
|
|
3
4
|
import FormSetting from "./form-setting.vue.js";
|
|
@@ -7,8 +8,6 @@ import { addWindowResizeHandler } from "../../../utils/util.js";
|
|
|
7
8
|
import i18n from "../../../utils/i18n.js";
|
|
8
9
|
import emitter from "../../../utils/emitter.js";
|
|
9
10
|
import _sfc_main$1 from "../../code-editor/code-modal-editor.vue.js";
|
|
10
|
-
import { TpfConfigProvider } from "tmgc2-share";
|
|
11
|
-
import { resolveComponent, createBlock, openBlock, withCtx, createVNode, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, createElementBlock, Fragment, renderList, resolveDynamicComponent } from "vue";
|
|
12
11
|
/* empty css */
|
|
13
12
|
/* empty css */
|
|
14
13
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -19,7 +18,10 @@ const _sfc_main = {
|
|
|
19
18
|
mixins: [i18n, emitter],
|
|
20
19
|
components: {
|
|
21
20
|
CodeEditor,
|
|
22
|
-
TpfConfigProvider
|
|
21
|
+
TpfConfigProvider: defineAsyncComponent(async () => {
|
|
22
|
+
const { TpfConfigProvider } = await import("tmgc2-share");
|
|
23
|
+
return TpfConfigProvider;
|
|
24
|
+
}),
|
|
23
25
|
FormSetting,
|
|
24
26
|
CodeModalEditor: _sfc_main$1,
|
|
25
27
|
// DataSourceSetting,
|
|
@@ -446,7 +448,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
446
448
|
_: 1
|
|
447
449
|
});
|
|
448
450
|
}
|
|
449
|
-
const SettingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
451
|
+
const SettingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-82f86155"]]);
|
|
450
452
|
export {
|
|
451
453
|
SettingPanel as default
|
|
452
454
|
};
|
|
@@ -9,9 +9,10 @@ const _sfc_main = {
|
|
|
9
9
|
mixins: [i18n],
|
|
10
10
|
components: {
|
|
11
11
|
CodeModalEditor: _sfc_main$1,
|
|
12
|
-
TpfModal: defineAsyncComponent(
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
TpfModal: defineAsyncComponent(async () => {
|
|
13
|
+
const { TpfModal } = await import("tmgc2-share");
|
|
14
|
+
return TpfModal;
|
|
15
|
+
})
|
|
15
16
|
},
|
|
16
17
|
props: {
|
|
17
18
|
designer: Object,
|
|
@@ -363,7 +364,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
363
364
|
}, null, 8, ["onSave", "title"])
|
|
364
365
|
], 64);
|
|
365
366
|
}
|
|
366
|
-
const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
367
|
+
const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-af4cd3cd"]]);
|
|
367
368
|
export {
|
|
368
369
|
dataTableTableColumnsEditor as default
|
|
369
370
|
};
|
|
@@ -15,12 +15,14 @@ const _sfc_main = {
|
|
|
15
15
|
mixins: [i18n],
|
|
16
16
|
components: {
|
|
17
17
|
VFormRender: defineAsyncComponent(() => import("../../../../render.js")),
|
|
18
|
-
CodeEditor: defineAsyncComponent(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
CodeEditor: defineAsyncComponent(async () => {
|
|
19
|
+
const { TpfCodeEditor } = await import("tmgc2-share");
|
|
20
|
+
return TpfCodeEditor;
|
|
21
|
+
}),
|
|
22
|
+
TpfModal: defineAsyncComponent(async () => {
|
|
23
|
+
const { TpfModal } = await import("tmgc2-share");
|
|
24
|
+
return TpfModal;
|
|
25
|
+
}),
|
|
24
26
|
SvgIcon
|
|
25
27
|
},
|
|
26
28
|
props: {
|
|
@@ -1042,7 +1044,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1042
1044
|
}, 8, ["title", "visible"])) : createCommentVNode("", true)
|
|
1043
1045
|
]);
|
|
1044
1046
|
}
|
|
1045
|
-
const ToolbarPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
1047
|
+
const ToolbarPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-c255c476"]]);
|
|
1046
1048
|
export {
|
|
1047
1049
|
ToolbarPanel as default
|
|
1048
1050
|
};
|
|
@@ -2,7 +2,6 @@ import i18n from "../../utils/i18n.js";
|
|
|
2
2
|
import zhCN from "ant-design-vue/es/locale/zh_CN";
|
|
3
3
|
import { defineAsyncComponent, resolveComponent, resolveDirective, createBlock, openBlock, withCtx, createVNode, mergeProps, withDirectives, createElementBlock, createElementVNode } from "vue";
|
|
4
4
|
import _sfc_main$1 from "./SubmitButtonRender.vue.js";
|
|
5
|
-
import { TpfConfigProvider } from "tmgc2-share";
|
|
6
5
|
/* empty css */
|
|
7
6
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
7
|
const _sfc_main = {
|
|
@@ -48,7 +47,10 @@ const _sfc_main = {
|
|
|
48
47
|
}
|
|
49
48
|
},
|
|
50
49
|
components: {
|
|
51
|
-
TpfConfigProvider
|
|
50
|
+
TpfConfigProvider: defineAsyncComponent(async () => {
|
|
51
|
+
const { TpfConfigProvider } = await import("tmgc2-share");
|
|
52
|
+
return TpfConfigProvider;
|
|
53
|
+
}),
|
|
52
54
|
SubmitButtonRender: _sfc_main$1,
|
|
53
55
|
VFormRender: defineAsyncComponent(() => import("../../../render.js"))
|
|
54
56
|
},
|
package/src/utils/i18n.js
CHANGED
|
@@ -1,37 +1,6 @@
|
|
|
1
1
|
import { createI18n } from "./smart-vue-i18n/index.js";
|
|
2
|
-
const langLoaders = {
|
|
3
|
-
"zh-CN": async () => {
|
|
4
|
-
const [zhCN, zhLocale, zhLocale_render, zhLocale_extension] = await Promise.all([
|
|
5
|
-
import("ant-design-vue/es/locale/zh_CN"),
|
|
6
|
-
import("../lang/zh-CN.js"),
|
|
7
|
-
import("../lang/zh-CN_render.js"),
|
|
8
|
-
import("../lang/zh-CN_extension.js")
|
|
9
|
-
]);
|
|
10
|
-
return {
|
|
11
|
-
...zhCN.default,
|
|
12
|
-
...zhLocale.default,
|
|
13
|
-
...zhLocale_render.default,
|
|
14
|
-
...zhLocale_extension.default
|
|
15
|
-
};
|
|
16
|
-
},
|
|
17
|
-
"en-US": async () => {
|
|
18
|
-
const [enUS, enLocale, enLocale_render, enLocale_extension] = await Promise.all([
|
|
19
|
-
import("ant-design-vue/es/locale/en_US"),
|
|
20
|
-
import("../lang/en-US.js"),
|
|
21
|
-
import("../lang/en-US_render.js"),
|
|
22
|
-
import("../lang/en-US_extension.js")
|
|
23
|
-
]);
|
|
24
|
-
return {
|
|
25
|
-
...enUS.default,
|
|
26
|
-
...enLocale.default,
|
|
27
|
-
...enLocale_render.default,
|
|
28
|
-
...enLocale_extension.default
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
2
|
const i18n = createI18n({
|
|
33
|
-
locale: localStorage.getItem("lowcode_local") || "zh-CN"
|
|
34
|
-
langLoaders
|
|
3
|
+
locale: localStorage.getItem("lowcode_local") || "zh-CN"
|
|
35
4
|
});
|
|
36
5
|
const changeLocale = async function(langName) {
|
|
37
6
|
await i18n.setLang(langName);
|
|
@@ -4,6 +4,36 @@ const locale = reactive({
|
|
|
4
4
|
lang: localStorage.getItem("lowcode_local") || "zh-CN",
|
|
5
5
|
messages: {}
|
|
6
6
|
});
|
|
7
|
+
const langLoaders = {
|
|
8
|
+
"zh-CN": async () => {
|
|
9
|
+
const [zhCN, zhLocale, zhLocale_render, zhLocale_extension] = await Promise.all([
|
|
10
|
+
import("ant-design-vue/es/locale/zh_CN"),
|
|
11
|
+
import("../../lang/zh-CN.js"),
|
|
12
|
+
import("../../lang/zh-CN_render.js"),
|
|
13
|
+
import("../../lang/zh-CN_extension.js")
|
|
14
|
+
]);
|
|
15
|
+
return {
|
|
16
|
+
...zhCN.default,
|
|
17
|
+
...zhLocale.default,
|
|
18
|
+
...zhLocale_render.default,
|
|
19
|
+
...zhLocale_extension.default
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
"en-US": async () => {
|
|
23
|
+
const [enUS, enLocale, enLocale_render, enLocale_extension] = await Promise.all([
|
|
24
|
+
import("ant-design-vue/es/locale/en_US"),
|
|
25
|
+
import("../../lang/en-US.js"),
|
|
26
|
+
import("../../lang/en-US_render.js"),
|
|
27
|
+
import("../../lang/en-US_extension.js")
|
|
28
|
+
]);
|
|
29
|
+
return {
|
|
30
|
+
...enUS.default,
|
|
31
|
+
...enLocale.default,
|
|
32
|
+
...enLocale_render.default,
|
|
33
|
+
...enLocale_extension.default
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
7
37
|
function createI18n(options) {
|
|
8
38
|
const methoad = {
|
|
9
39
|
get messages() {
|
|
@@ -21,8 +51,8 @@ function createI18n(options) {
|
|
|
21
51
|
async setLang(lang) {
|
|
22
52
|
locale.lang = lang;
|
|
23
53
|
if (!(lang in locale.messages)) {
|
|
24
|
-
if (lang in
|
|
25
|
-
const messages = await
|
|
54
|
+
if (lang in langLoaders) {
|
|
55
|
+
const messages = await langLoaders[lang]();
|
|
26
56
|
locale.messages[lang] = messages;
|
|
27
57
|
}
|
|
28
58
|
}
|