@tmagic/editor 1.7.11 → 1.7.12
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,9 +1,8 @@
|
|
|
1
1
|
import base_default from "./formConfigs/base.js";
|
|
2
2
|
import http_default from "./formConfigs/http.js";
|
|
3
|
-
import { defineFormItem } from "@tmagic/form";
|
|
4
3
|
import { dataSourceTemplateRegExp, getKeysArray, isNumber } from "@tmagic/utils";
|
|
5
4
|
//#region packages/editor/src/utils/data-source/index.ts
|
|
6
|
-
var dataSourceFormConfig =
|
|
5
|
+
var dataSourceFormConfig = {
|
|
7
6
|
type: "tab",
|
|
8
7
|
items: [
|
|
9
8
|
{
|
|
@@ -65,7 +64,7 @@ var dataSourceFormConfig = defineFormItem({
|
|
|
65
64
|
}]
|
|
66
65
|
}
|
|
67
66
|
]
|
|
68
|
-
}
|
|
67
|
+
};
|
|
69
68
|
var fillConfig = (config) => [
|
|
70
69
|
...base_default(),
|
|
71
70
|
...config,
|
|
@@ -7100,7 +7100,7 @@
|
|
|
7100
7100
|
]);
|
|
7101
7101
|
//#endregion
|
|
7102
7102
|
//#region packages/editor/src/utils/data-source/index.ts
|
|
7103
|
-
var dataSourceFormConfig =
|
|
7103
|
+
var dataSourceFormConfig = {
|
|
7104
7104
|
type: "tab",
|
|
7105
7105
|
items: [
|
|
7106
7106
|
{
|
|
@@ -7162,7 +7162,7 @@
|
|
|
7162
7162
|
}]
|
|
7163
7163
|
}
|
|
7164
7164
|
]
|
|
7165
|
-
}
|
|
7165
|
+
};
|
|
7166
7166
|
var fillConfig$1 = (config) => [
|
|
7167
7167
|
...base_default(),
|
|
7168
7168
|
...config,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.7.
|
|
2
|
+
"version": "1.7.12",
|
|
3
3
|
"name": "@tmagic/editor",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"moveable": "^0.53.0",
|
|
59
59
|
"serialize-javascript": "^7.0.0",
|
|
60
60
|
"sortablejs": "^1.15.6",
|
|
61
|
-
"@tmagic/design": "1.7.
|
|
62
|
-
"@tmagic/
|
|
63
|
-
"@tmagic/
|
|
64
|
-
"@tmagic/
|
|
65
|
-
"@tmagic/
|
|
61
|
+
"@tmagic/design": "1.7.12",
|
|
62
|
+
"@tmagic/form": "1.7.12",
|
|
63
|
+
"@tmagic/stage": "1.7.12",
|
|
64
|
+
"@tmagic/utils": "1.7.12",
|
|
65
|
+
"@tmagic/table": "1.7.12"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/events": "^3.0.3",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"type-fest": "^5.2.0",
|
|
77
77
|
"typescript": "^6.0.3",
|
|
78
78
|
"vue": "^3.5.33",
|
|
79
|
-
"@tmagic/core": "1.7.
|
|
79
|
+
"@tmagic/core": "1.7.12"
|
|
80
80
|
},
|
|
81
81
|
"peerDependenciesMeta": {
|
|
82
82
|
"typescript": {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { DataSchema, DataSourceFieldType, DataSourceSchema } from '@tmagic/core';
|
|
2
|
-
import { type CascaderOption,
|
|
2
|
+
import { type CascaderOption, type FormConfig, type TabConfig } from '@tmagic/form';
|
|
3
3
|
import { dataSourceTemplateRegExp, getKeysArray, isNumber } from '@tmagic/utils';
|
|
4
4
|
|
|
5
5
|
import BaseFormConfig from './formConfigs/base';
|
|
6
6
|
import HttpFormConfig from './formConfigs/http';
|
|
7
7
|
|
|
8
|
-
const dataSourceFormConfig =
|
|
8
|
+
const dataSourceFormConfig: TabConfig = {
|
|
9
9
|
type: 'tab',
|
|
10
10
|
items: [
|
|
11
11
|
{
|
|
@@ -73,9 +73,13 @@ const dataSourceFormConfig = defineFormItem({
|
|
|
73
73
|
],
|
|
74
74
|
},
|
|
75
75
|
],
|
|
76
|
-
}
|
|
76
|
+
};
|
|
77
77
|
|
|
78
|
-
const fillConfig = (config: FormConfig): FormConfig => [
|
|
78
|
+
const fillConfig = <T = never>(config: FormConfig<T>): FormConfig<T> => [
|
|
79
|
+
...BaseFormConfig(),
|
|
80
|
+
...config,
|
|
81
|
+
dataSourceFormConfig,
|
|
82
|
+
];
|
|
79
83
|
|
|
80
84
|
export const getFormConfig = (type: string, configs: Record<string, FormConfig>): FormConfig => {
|
|
81
85
|
switch (type) {
|