@fecp/designer 5.6.17 → 5.6.19
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/es/designer/package.json.mjs +1 -1
- package/es/designer/src/layout/aside/index.vue.mjs +6 -6
- package/es/designer/src/layout/header/index.vue.mjs +2 -2
- package/es/designer/src/layout/index.vue.mjs +38 -45
- package/es/designer/src/layout/property/index.vue.mjs +2 -2
- package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -2
- package/es/designer/src/packages/utils/common.mjs +17 -17
- package/es/designer/src/store/index.mjs +2 -2
- package/es/designer.css +140 -62
- package/es/node_modules/@vant/use/dist/index.esm.mjs +1 -1
- package/es/node_modules/d3-sankey/node_modules/d3-path/src/path.mjs +73 -0
- package/es/node_modules/d3-sankey/node_modules/d3-shape/src/array.mjs +4 -0
- package/es/node_modules/d3-sankey/node_modules/d3-shape/src/constant.mjs +8 -0
- package/es/node_modules/d3-sankey/node_modules/d3-shape/src/link/index.mjs +45 -0
- package/es/node_modules/d3-sankey/node_modules/d3-shape/src/point.mjs +10 -0
- package/es/node_modules/d3-sankey/src/sankeyLinkHorizontal.mjs +1 -1
- package/es/node_modules/vant/es/toast/function-call.mjs +1 -1
- package/es/packages/mobile/src/assets/images/ai2.png.mjs +4 -0
- package/es/packages/mobile/src/components/ai/AiChat/AiChat.vue.mjs +145 -22
- package/es/packages/mobile/src/components/ai/ChatInput/ChatInput.vue.mjs +4 -6
- package/es/packages/mobile/src/components/ai/ChatPanel/ChatPanel.vue.mjs +71 -11
- package/es/packages/mobile/src/components/ai/MarkdownRenderer/MarkdownRenderer.vue.mjs +37 -3
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/mobile/src/components/form/uploader/Uploader.vue.mjs +1 -2
- package/es/packages/mobile/src/composables/useAI/adapters/h5.mjs +255 -0
- package/es/packages/mobile/src/composables/useAI/adapters/index.mjs +3 -3
- package/es/packages/mobile/src/composables/useAI/useChat.mjs +10 -3
- package/es/packages/mobile/src/composables/usePageEvents.mjs +1 -1
- package/es/packages/mobile/src/index.vue.mjs +20 -8
- package/es/packages/mobile/src/utils/datasource.mjs +1 -1
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +0 -1
- package/es/packages/vue/src/components/forms/number/Number.vue.mjs +0 -1
- package/es/packages/vue/src/components/forms/text/Text.vue.mjs +0 -1
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +0 -1
- package/es/packages/vue/src/composables/usePageEvents.mjs +0 -1
- package/es/packages/vue/src/utils/datasource.mjs +0 -20
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/layout/index.vue.js +55 -62
- package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- package/lib/designer/src/packages/form/property/widgets.vue.js +2 -2
- package/lib/designer/src/store/index.js +2 -2
- package/lib/designer.css +140 -62
- package/lib/node_modules/d3-sankey/node_modules/d3-path/src/path.js +73 -0
- package/lib/node_modules/d3-sankey/node_modules/d3-shape/src/array.js +4 -0
- package/lib/node_modules/d3-sankey/node_modules/d3-shape/src/constant.js +8 -0
- package/lib/node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js +45 -0
- package/lib/node_modules/d3-sankey/node_modules/d3-shape/src/point.js +10 -0
- package/lib/node_modules/d3-sankey/src/sankeyLinkHorizontal.js +1 -1
- package/lib/packages/mobile/src/assets/images/ai2.png.js +4 -0
- package/lib/packages/mobile/src/components/ai/AiChat/AiChat.vue.js +144 -21
- package/lib/packages/mobile/src/components/ai/ChatInput/ChatInput.vue.js +4 -6
- package/lib/packages/mobile/src/components/ai/ChatPanel/ChatPanel.vue.js +73 -13
- package/lib/packages/mobile/src/components/ai/MarkdownRenderer/MarkdownRenderer.vue.js +37 -3
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/mobile/src/components/form/uploader/Uploader.vue.js +1 -2
- package/lib/packages/mobile/src/composables/useAI/adapters/h5.js +255 -0
- package/lib/packages/mobile/src/composables/useAI/adapters/index.js +3 -3
- package/lib/packages/mobile/src/composables/useAI/useChat.js +10 -3
- package/lib/packages/mobile/src/composables/usePageEvents.js +1 -1
- package/lib/packages/mobile/src/index.vue.js +19 -7
- package/lib/packages/mobile/src/utils/datasource.js +1 -1
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +0 -1
- package/lib/packages/vue/src/components/forms/number/Number.vue.js +0 -1
- package/lib/packages/vue/src/components/forms/text/Text.vue.js +0 -1
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +0 -1
- package/lib/packages/vue/src/composables/usePageEvents.js +0 -1
- package/lib/packages/vue/src/utils/datasource.js +2 -22
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ import components from "../../packages/form/aside/index.mjs";
|
|
|
14
14
|
import FieldRecycleBin from "./fieldRecycleBin.vue.mjs";
|
|
15
15
|
import HiddenFieldDialog from "./HiddenFieldDialog.vue.mjs";
|
|
16
16
|
import { throttle as eo } from "../../../../node_modules/@vexip-ui/utils/dist/index.mjs";
|
|
17
|
-
import
|
|
17
|
+
import store from "../../store/index.mjs";
|
|
18
18
|
/* empty css */
|
|
19
19
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
20
20
|
import { ElAside } from "../../../../node_modules/element-plus/es/components/container/index.mjs";
|
|
@@ -37,7 +37,7 @@ const _sfc_main = {
|
|
|
37
37
|
setup(__props, { emit: __emit }) {
|
|
38
38
|
const emit = __emit;
|
|
39
39
|
const editingAside = computed(() => {
|
|
40
|
-
switch (
|
|
40
|
+
switch (store.getters.editingType) {
|
|
41
41
|
case "table":
|
|
42
42
|
return components$1;
|
|
43
43
|
case "form":
|
|
@@ -46,7 +46,7 @@ const _sfc_main = {
|
|
|
46
46
|
return null;
|
|
47
47
|
});
|
|
48
48
|
const editingType = computed(() => {
|
|
49
|
-
return
|
|
49
|
+
return store.getters.editingType;
|
|
50
50
|
});
|
|
51
51
|
const activeNames = ref(["basic", "advanced"]);
|
|
52
52
|
const recycleBinVisible = ref(false);
|
|
@@ -70,19 +70,19 @@ const _sfc_main = {
|
|
|
70
70
|
}
|
|
71
71
|
function onDragEnd(event) {
|
|
72
72
|
setSelectedItem(event.clonedData);
|
|
73
|
-
if (
|
|
73
|
+
if (store.getters.editingType == "form") {
|
|
74
74
|
emitter.emit("onFormDragEnd", event);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
const onMove = eo((event) => {
|
|
78
|
-
if (
|
|
78
|
+
if (store.getters.editingType == "form") {
|
|
79
79
|
emit("onFormDragMove", event);
|
|
80
80
|
return true;
|
|
81
81
|
}
|
|
82
82
|
return true;
|
|
83
83
|
}, 50);
|
|
84
84
|
function onStart(event) {
|
|
85
|
-
if (
|
|
85
|
+
if (store.getters.editingType == "form") {
|
|
86
86
|
emitter.emit("onFormDragStart", event);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -15,7 +15,7 @@ import tableHeaderBtn from "../../packages/table/headerBtn.vue.mjs";
|
|
|
15
15
|
import formHeaderBtn from "../../packages/form/headerBtn.vue.mjs";
|
|
16
16
|
import { getEditConfigData, getEditingType } from "../../packages/utils/common.mjs";
|
|
17
17
|
import api from "../../api/index.mjs";
|
|
18
|
-
import
|
|
18
|
+
import store from "../../store/index.mjs";
|
|
19
19
|
import packageJson from "../../../package.json.mjs";
|
|
20
20
|
import { defaultProperty } from "../../packages/form/aside/index.mjs";
|
|
21
21
|
import { defaultProperty as defaultProperty$1 } from "../../packages/table/aside/index.mjs";
|
|
@@ -42,7 +42,7 @@ const _sfc_main = {
|
|
|
42
42
|
const currentInstance = getCurrentInstance();
|
|
43
43
|
const ctx = currentInstance.proxy;
|
|
44
44
|
const editingHeaderBtn = computed(() => {
|
|
45
|
-
switch (
|
|
45
|
+
switch (store.getters.editingType) {
|
|
46
46
|
case "table":
|
|
47
47
|
return tableHeaderBtn;
|
|
48
48
|
case "form":
|
|
@@ -7,19 +7,18 @@ import "../../../node_modules/element-plus/es/index.mjs";
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
import "../../../node_modules/element-plus/theme-chalk/el-config-provider.css.mjs";
|
|
10
|
-
import { getCurrentInstance, ref, computed,
|
|
10
|
+
import { getCurrentInstance, ref, computed, createBlock, openBlock, unref, withCtx, createElementBlock, createCommentVNode, createVNode, resolveDynamicComponent } from "vue";
|
|
11
11
|
import zh_cn_default from "../../../node_modules/element-plus/es/locale/lang/zh-cn.mjs";
|
|
12
12
|
import LayoutAside from "./aside/index.vue.mjs";
|
|
13
13
|
import _sfc_main$1 from "./header/index.vue.mjs";
|
|
14
14
|
import LayoutProperty from "./property/index.vue.mjs";
|
|
15
15
|
import tableWorkArea from "../packages/table/index.vue.mjs";
|
|
16
16
|
import formWorkArea from "../packages/form/index.vue.mjs";
|
|
17
|
-
import
|
|
18
|
-
import { setSelectedItem, setHoverItem
|
|
17
|
+
import store from "../store/index.mjs";
|
|
18
|
+
import { setEditConfigData, setSelectedItem, setHoverItem } from "../packages/utils/common.mjs";
|
|
19
19
|
import api from "../api/index.mjs";
|
|
20
20
|
import { defaultTableConfig } from "../packages/table/default.mjs";
|
|
21
21
|
import { defaultFormConfig } from "../packages/form/default.mjs";
|
|
22
|
-
import { useStore } from "../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
|
|
23
22
|
/* empty css */
|
|
24
23
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
25
24
|
import { ElConfigProvider } from "../../../node_modules/element-plus/es/components/config-provider/index.mjs";
|
|
@@ -32,48 +31,45 @@ const _hoisted_1 = {
|
|
|
32
31
|
const _sfc_main = {
|
|
33
32
|
__name: "index",
|
|
34
33
|
setup(__props) {
|
|
35
|
-
const store = useStore();
|
|
36
34
|
const currentInstance = getCurrentInstance();
|
|
37
35
|
const ctx = currentInstance.proxy;
|
|
38
36
|
const pkId = getUrlParam("pkId");
|
|
39
37
|
const isInitd = ref(0);
|
|
40
38
|
const compRef = ref(null);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
storeDev.commit("set_editing_type", data.type);
|
|
76
|
-
}
|
|
39
|
+
if (!pkId) {
|
|
40
|
+
isInitd.value = -1;
|
|
41
|
+
} else {
|
|
42
|
+
api.login4dev(ctx.$http).then((data) => {
|
|
43
|
+
store.commit("set_token", data.token);
|
|
44
|
+
store.commit("set_refreshToken", data.refreshToken);
|
|
45
|
+
api.getById(ctx.$http, pkId).then((data2) => {
|
|
46
|
+
const templateName = data2.templateName;
|
|
47
|
+
const templateKey = data2.templateKey;
|
|
48
|
+
document.title = templateName || "表单设计器";
|
|
49
|
+
if (data2.type == "table") {
|
|
50
|
+
const tableOptions = ref({
|
|
51
|
+
pkId,
|
|
52
|
+
templateName,
|
|
53
|
+
templateKey,
|
|
54
|
+
...defaultTableConfig,
|
|
55
|
+
...JSON.parse(data2.context)
|
|
56
|
+
});
|
|
57
|
+
setEditConfigData(tableOptions.value);
|
|
58
|
+
isInitd.value = 1;
|
|
59
|
+
} else if (data2.type == "form") {
|
|
60
|
+
const formOptions = ref({
|
|
61
|
+
pkId,
|
|
62
|
+
templateName,
|
|
63
|
+
templateKey,
|
|
64
|
+
...defaultFormConfig,
|
|
65
|
+
...JSON.parse(data2.context)
|
|
66
|
+
});
|
|
67
|
+
setEditConfigData(formOptions.value);
|
|
68
|
+
isInitd.value = 1;
|
|
69
|
+
}
|
|
70
|
+
store.commit("set_editing_type", data2.type);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
77
73
|
}
|
|
78
74
|
const editingArea = computed(() => {
|
|
79
75
|
switch (store.getters.editingType) {
|
|
@@ -99,9 +95,6 @@ const _sfc_main = {
|
|
|
99
95
|
if (values.length === 0) return null;
|
|
100
96
|
return values.length === 1 ? values[0] : values;
|
|
101
97
|
}
|
|
102
|
-
onMounted(() => {
|
|
103
|
-
init();
|
|
104
|
-
});
|
|
105
98
|
return (_ctx, _cache) => {
|
|
106
99
|
const _component_el_config_provider = ElConfigProvider;
|
|
107
100
|
const _component_el_main = ElMain;
|
|
@@ -151,7 +144,7 @@ const _sfc_main = {
|
|
|
151
144
|
};
|
|
152
145
|
}
|
|
153
146
|
};
|
|
154
|
-
const layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
147
|
+
const layout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ae1b4337"]]);
|
|
155
148
|
export {
|
|
156
149
|
layout as default
|
|
157
150
|
};
|
|
@@ -4,7 +4,7 @@ import "../../../../node_modules/element-plus/es/index.mjs";
|
|
|
4
4
|
import { computed, createBlock, openBlock, withCtx, resolveDynamicComponent } from "vue";
|
|
5
5
|
import _sfc_main$2 from "../../packages/table/property/index.vue.mjs";
|
|
6
6
|
import _sfc_main$1 from "../../packages/form/property/index.vue.mjs";
|
|
7
|
-
import
|
|
7
|
+
import store from "../../store/index.mjs";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
10
10
|
import { ElAside } from "../../../../node_modules/element-plus/es/components/container/index.mjs";
|
|
@@ -12,7 +12,7 @@ const _sfc_main = {
|
|
|
12
12
|
__name: "index",
|
|
13
13
|
setup(__props) {
|
|
14
14
|
const editingProperty = computed(() => {
|
|
15
|
-
switch (
|
|
15
|
+
switch (store.getters.editingType) {
|
|
16
16
|
case "table":
|
|
17
17
|
return _sfc_main$2;
|
|
18
18
|
case "form":
|
|
@@ -52,8 +52,8 @@ import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
|
52
52
|
import "../../../components/TemplateSelector.vue.mjs";
|
|
53
53
|
import "../../table/default.mjs";
|
|
54
54
|
/* empty css */
|
|
55
|
-
/* empty css
|
|
56
|
-
/* empty css
|
|
55
|
+
/* empty css */
|
|
56
|
+
/* empty css */
|
|
57
57
|
import "../../../store/index.mjs";
|
|
58
58
|
/* empty css */
|
|
59
59
|
import { ElCollapse, ElCollapseItem } from "../../../../../node_modules/element-plus/es/components/collapse/index.mjs";
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
1
|
+
import store from "../../store/index.mjs";
|
|
2
2
|
import cloneDeep$1 from "../../../../node_modules/lodash-es/cloneDeep.mjs";
|
|
3
3
|
function cloneDeep(data) {
|
|
4
4
|
return cloneDeep$1(data);
|
|
5
5
|
}
|
|
6
6
|
function setEditConfigData(data) {
|
|
7
|
-
|
|
7
|
+
store.commit("set_edit_config_data", data);
|
|
8
8
|
}
|
|
9
9
|
function getEditConfigData() {
|
|
10
|
-
return
|
|
10
|
+
return store.getters.editConfigData;
|
|
11
11
|
}
|
|
12
12
|
function setSelectedItem(item) {
|
|
13
|
-
|
|
13
|
+
store.commit("set_selected_item", item);
|
|
14
14
|
}
|
|
15
15
|
function setHoverItem(item) {
|
|
16
|
-
|
|
16
|
+
store.commit("set_hover_item", item);
|
|
17
17
|
}
|
|
18
18
|
function isHoverItem(item) {
|
|
19
19
|
var _a;
|
|
20
|
-
return ((_a =
|
|
20
|
+
return ((_a = store.getters.hoverItem) == null ? void 0 : _a.id) == (item == null ? void 0 : item.id);
|
|
21
21
|
}
|
|
22
22
|
function isSelectedItem(item) {
|
|
23
23
|
var _a;
|
|
24
|
-
return ((_a =
|
|
24
|
+
return ((_a = store.getters.selectedItem) == null ? void 0 : _a.id) == (item == null ? void 0 : item.id);
|
|
25
25
|
}
|
|
26
26
|
function getCurrentItem() {
|
|
27
|
-
return
|
|
27
|
+
return store.getters.selectedItem;
|
|
28
28
|
}
|
|
29
29
|
function getCurrentClass(item) {
|
|
30
30
|
return {
|
|
@@ -33,24 +33,24 @@ function getCurrentClass(item) {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
function setEditConfigDataSources(dataSources) {
|
|
36
|
-
const editConfigData =
|
|
36
|
+
const editConfigData = store.getters.editConfigData;
|
|
37
37
|
editConfigData.dataSources = dataSources;
|
|
38
|
-
|
|
38
|
+
store.commit("set_edit_config_data", editConfigData);
|
|
39
39
|
}
|
|
40
40
|
function getEditConfigDialogs() {
|
|
41
|
-
return
|
|
41
|
+
return store.getters.editConfigData.dialogs || [];
|
|
42
42
|
}
|
|
43
43
|
function setEditConfigDialogs(dialogs) {
|
|
44
|
-
const editConfigData =
|
|
44
|
+
const editConfigData = store.getters.editConfigData;
|
|
45
45
|
editConfigData.dialogs = dialogs;
|
|
46
|
-
|
|
46
|
+
store.commit("set_edit_config_data", editConfigData);
|
|
47
47
|
}
|
|
48
48
|
function getEditConfigDataSources() {
|
|
49
|
-
return
|
|
49
|
+
return store.getters.editConfigData.dataSources;
|
|
50
50
|
}
|
|
51
51
|
function getEditConfigDataFields() {
|
|
52
|
-
const editingType =
|
|
53
|
-
const fieldsData =
|
|
52
|
+
const editingType = store.getters.editingType;
|
|
53
|
+
const fieldsData = store.getters.editConfigData.fieldsData;
|
|
54
54
|
switch (editingType) {
|
|
55
55
|
case "table":
|
|
56
56
|
return fieldsData;
|
|
@@ -60,7 +60,7 @@ function getEditConfigDataFields() {
|
|
|
60
60
|
return fieldsData;
|
|
61
61
|
}
|
|
62
62
|
function getEditingType() {
|
|
63
|
-
return
|
|
63
|
+
return store.getters.editingType;
|
|
64
64
|
}
|
|
65
65
|
export {
|
|
66
66
|
cloneDeep,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import a from "../../../node_modules/vuex-persistedstate/dist/vuex-persistedstate.es.mjs";
|
|
2
2
|
import index from "../../../node_modules/vuex/dist/vuex.esm-bundler.mjs";
|
|
3
3
|
import { mutations, getters, state } from "./designer.mjs";
|
|
4
|
-
const
|
|
4
|
+
const store = index.createStore({
|
|
5
5
|
plugins: [
|
|
6
6
|
a({
|
|
7
7
|
key: "fec-dev-designer",
|
|
@@ -15,5 +15,5 @@ const storeDev = index.createStore({
|
|
|
15
15
|
modules: {}
|
|
16
16
|
});
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
store as default
|
|
19
19
|
};
|