plain-design 1.0.0-beta.137 → 1.0.0-beta.139
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/plain-design.commonjs.min.js +1 -1
- package/dist/plain-design.min.js +1 -1
- package/dist/report.html +2 -2
- package/package.json +11 -12
- package/src/packages/components/$ai/index.tsx +1 -1
- package/src/packages/components/$object/object.conver.ts +2 -2
- package/src/packages/components/AutoTable/use/useTableOption.ai.tsx +3 -3
- package/src/packages/i18n/i18n.utils.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plain-design",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.139",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/plain-design.min.js",
|
|
6
6
|
"module": "dist/plain-design.commonjs.min.js",
|
|
@@ -41,16 +41,6 @@
|
|
|
41
41
|
"react-transition-group": "4.4.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@vue/cli-plugin-eslint": "4.5.19",
|
|
45
|
-
"@vue/compiler-sfc": "3.4.3",
|
|
46
|
-
"@vue/eslint-config-typescript": "^7.0.0",
|
|
47
|
-
"babel-plugin-import": "1.13.8",
|
|
48
|
-
"babel-plugin-syntax-jsx": "6.18.0",
|
|
49
|
-
"eslint": "6.8.0",
|
|
50
|
-
"eslint-plugin-vue": "7.20.0",
|
|
51
|
-
"exceljs": "^4.2.1",
|
|
52
|
-
"file-saver": "^2.0.5",
|
|
53
|
-
|
|
54
44
|
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
55
45
|
"@babel/plugin-transform-class-properties": "^7.22.3",
|
|
56
46
|
"@babel/preset-env": "^7.13.15",
|
|
@@ -66,13 +56,22 @@
|
|
|
66
56
|
"@typescript-eslint/eslint-plugin": "^4.18.0",
|
|
67
57
|
"@typescript-eslint/parser": "^4.18.0",
|
|
68
58
|
"@vue/cli-plugin-babel": "~5.0.0",
|
|
59
|
+
"@vue/cli-plugin-eslint": "4.5.19",
|
|
69
60
|
"@vue/cli-plugin-typescript": "~5.0.0",
|
|
70
61
|
"@vue/cli-service": "~5.0.0",
|
|
62
|
+
"@vue/compiler-sfc": "3.4.3",
|
|
63
|
+
"@vue/eslint-config-typescript": "^7.0.0",
|
|
71
64
|
"autoprefixer": "^8.6.5",
|
|
72
65
|
"axios": "^1.7.7",
|
|
66
|
+
"babel-plugin-import": "1.13.8",
|
|
67
|
+
"babel-plugin-syntax-jsx": "6.18.0",
|
|
73
68
|
"core-js": "^3.8.3",
|
|
74
69
|
"cross-env": "^7.0.3",
|
|
75
70
|
"css-loader": "3.6.0",
|
|
71
|
+
"eslint": "6.8.0",
|
|
72
|
+
"eslint-plugin-vue": "7.20.0",
|
|
73
|
+
"exceljs": "^4.2.1",
|
|
74
|
+
"file-saver": "^2.0.5",
|
|
76
75
|
"fork-ts-checker-webpack-plugin": "^6.2.4",
|
|
77
76
|
"mini-css-extract-plugin": "^1.4.1",
|
|
78
77
|
"postcss": "^8.2.13",
|
|
@@ -86,7 +85,7 @@
|
|
|
86
85
|
"ts-loader": "^9.4.2",
|
|
87
86
|
"ts-node": "^9.1.1",
|
|
88
87
|
"tslib": "^2.5.0",
|
|
89
|
-
"typescript": "^5.
|
|
88
|
+
"typescript": "^5.8.3",
|
|
90
89
|
"url-loader": "^4.1.1",
|
|
91
90
|
"vue-template-compiler": "2.7.15",
|
|
92
91
|
"webpack-bundle-analyzer": "^4.4.1",
|
|
@@ -86,7 +86,7 @@ export const $ai = (() => {
|
|
|
86
86
|
|
|
87
87
|
const systemContent = `
|
|
88
88
|
当前时间是:${createSimpleDate()["YYYY-MM-DD HH:mm:ss"]}
|
|
89
|
-
|
|
89
|
+
你是一名专业的自然语言分析师,你需要将用户描述转化为一个json对象数据;这个json对象的属性是确定的,json对象的属性名来源于以下的字段的field,这个属性对应的值需要你从用户描述中获取,没有的话就给默认值null;
|
|
90
90
|
目前支持的字段:
|
|
91
91
|
${JSON.stringify(fields)}
|
|
92
92
|
|
|
@@ -30,7 +30,7 @@ export function convertRowToSelected<DATA extends PlainObject | PlainObject[] |
|
|
|
30
30
|
selected[value] = row[key];
|
|
31
31
|
return selected;
|
|
32
32
|
}, {} as any);
|
|
33
|
-
return Array.isArray(row) ? row.map((i) => convert(i)) : convert(row);
|
|
33
|
+
return Array.isArray(row) ? (row.map((i) => convert(i)) as any) : convert(row);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -52,5 +52,5 @@ export function convertSelectedToRow<DATA extends PlainObject | PlainObject[] |
|
|
|
52
52
|
row[key] = selected[value];
|
|
53
53
|
return row;
|
|
54
54
|
}, {} as any);
|
|
55
|
-
return Array.isArray(selected) ? selected.map((i) => convert(i)) : convert(selected);
|
|
55
|
+
return Array.isArray(selected) ? (selected.map((i) => convert(i)) as any) : convert(selected);
|
|
56
56
|
}
|
|
@@ -207,7 +207,7 @@ export const useTableOptionAi = AutoModule.createRegistration((option) => {
|
|
|
207
207
|
/*---------------------------------------处理搜索-------------------------------------------*/
|
|
208
208
|
|
|
209
209
|
let hasSearch = false;
|
|
210
|
-
const searchData: iTableAiOperateSearch['data'] | undefined = operateItems.find(i => i.type === "search")?.data;
|
|
210
|
+
const searchData: iTableAiOperateSearch['data'] | undefined = (operateItems as any).find((i: iTableAiOperate) => i.type === "search")?.data;
|
|
211
211
|
if (!!searchData) {
|
|
212
212
|
|
|
213
213
|
hasSearch = true;
|
|
@@ -320,7 +320,7 @@ export const useTableOptionAi = AutoModule.createRegistration((option) => {
|
|
|
320
320
|
|
|
321
321
|
/*---------------------------------------处理排序-------------------------------------------*/
|
|
322
322
|
let hasSort = false;
|
|
323
|
-
const sortData: iTableAiOperateSort['data'] | undefined = operateItems.find(i => i.type === "sort")?.data;
|
|
323
|
+
const sortData: iTableAiOperateSort['data'] | undefined = (operateItems as any).find((i: iTableAiOperate) => i.type === "sort")?.data;
|
|
324
324
|
if (!!sortData) {
|
|
325
325
|
hasSort = true;
|
|
326
326
|
option.settingSeniorSort.methods.update(sortData, false);
|
|
@@ -328,7 +328,7 @@ export const useTableOptionAi = AutoModule.createRegistration((option) => {
|
|
|
328
328
|
|
|
329
329
|
/*---------------------------------------处理配置-------------------------------------------*/
|
|
330
330
|
let hasConfig = false;
|
|
331
|
-
const configData: iTableAiOperateConfig['data'] | undefined = operateItems.find(i => i.type === "config")?.data;
|
|
331
|
+
const configData: iTableAiOperateConfig['data'] | undefined = (operateItems as any).find((i: iTableAiOperate) => i.type === "config")?.data;
|
|
332
332
|
if (!!configData) {
|
|
333
333
|
hasConfig = true;
|
|
334
334
|
await option.settingConfig.methods.updateItemPlc({
|
|
@@ -73,7 +73,7 @@ export const i18n = (() => {
|
|
|
73
73
|
for (let i = 0, j = array.length; i < j; i++) {
|
|
74
74
|
const property = array[i];
|
|
75
75
|
let value = current[property];
|
|
76
|
-
if (i === j - 1) return !options ? value : formatLang(value, options)
|
|
76
|
+
if (i === j - 1) return !options ? value : formatLang(value, options)!;
|
|
77
77
|
if (!value) return '';
|
|
78
78
|
current = value;
|
|
79
79
|
}
|