@cniot/mdd-editor 0.2.0-beta.39 → 0.2.0-beta.40
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/README.MD +3 -0
- package/build/index.cjs.js +2 -2
- package/build/index.es.js +16 -14
- package/package.json +1 -1
- package/src/schema/edit-table/index.js +1 -1
- package/src/schema/edit-table/table.js +2 -0
package/build/index.es.js
CHANGED
|
@@ -2790,7 +2790,7 @@ class MiddleItem extends JSONWatch {
|
|
|
2790
2790
|
delete() {
|
|
2791
2791
|
}
|
|
2792
2792
|
}
|
|
2793
|
-
class FtpSchema
|
|
2793
|
+
class FtpSchema extends Schema {
|
|
2794
2794
|
constructor(props, isCompleteSchema = false) {
|
|
2795
2795
|
const { api, filter, headerToolbar, table, tabs, middleModules, ...more2 } = isCompleteSchema ? props.body : props;
|
|
2796
2796
|
super(more2);
|
|
@@ -2963,9 +2963,9 @@ class FtpSchema$1 extends Schema {
|
|
|
2963
2963
|
super.emit(EVENT_KEY.SCHEMA_UPDATE, { schemaJson: this.getAllJSON(), schema: this });
|
|
2964
2964
|
}
|
|
2965
2965
|
}
|
|
2966
|
-
__publicField(FtpSchema
|
|
2967
|
-
__publicField(FtpSchema
|
|
2968
|
-
__publicField(FtpSchema
|
|
2966
|
+
__publicField(FtpSchema, "Filter", Filter);
|
|
2967
|
+
__publicField(FtpSchema, "HeaderToolbar", HeaderToolbar$1);
|
|
2968
|
+
__publicField(FtpSchema, "Table", TableSchema$2);
|
|
2969
2969
|
class TableSchema$1 extends JSONWatch {
|
|
2970
2970
|
constructor(props) {
|
|
2971
2971
|
super({
|
|
@@ -3080,7 +3080,7 @@ class FormSchema$1 extends JSONWatch {
|
|
|
3080
3080
|
return super.getJSON();
|
|
3081
3081
|
}
|
|
3082
3082
|
}
|
|
3083
|
-
class EditTableSchema extends JSONWatch {
|
|
3083
|
+
class EditTableSchema$1 extends JSONWatch {
|
|
3084
3084
|
constructor(props) {
|
|
3085
3085
|
super({
|
|
3086
3086
|
columns: props
|
|
@@ -3174,7 +3174,7 @@ __publicField(BlocksSchema, "BlocksInfoMap", {
|
|
|
3174
3174
|
toJSONKey: "columns"
|
|
3175
3175
|
},
|
|
3176
3176
|
"blocks-edit-table": {
|
|
3177
|
-
schema: EditTableSchema,
|
|
3177
|
+
schema: EditTableSchema$1,
|
|
3178
3178
|
toJSONKey: "columns"
|
|
3179
3179
|
},
|
|
3180
3180
|
"blocks-filter": {
|
|
@@ -3783,7 +3783,8 @@ class TableSchema extends JSONWatch {
|
|
|
3783
3783
|
paging: true,
|
|
3784
3784
|
disableGlobalConfig: false
|
|
3785
3785
|
},
|
|
3786
|
-
maxHeight
|
|
3786
|
+
maxHeight,
|
|
3787
|
+
storageKey = Date.now()
|
|
3787
3788
|
} = props || {};
|
|
3788
3789
|
super({
|
|
3789
3790
|
columns,
|
|
@@ -3795,7 +3796,8 @@ class TableSchema extends JSONWatch {
|
|
|
3795
3796
|
hideCommonToolbar,
|
|
3796
3797
|
useVirtual,
|
|
3797
3798
|
columnsAutoWidth,
|
|
3798
|
-
maxHeight
|
|
3799
|
+
maxHeight,
|
|
3800
|
+
storageKey
|
|
3799
3801
|
});
|
|
3800
3802
|
}
|
|
3801
3803
|
setFieldsAll(columns, ignoreUpdate = false) {
|
|
@@ -3857,7 +3859,7 @@ class HeaderToolbar extends JSONWatch {
|
|
|
3857
3859
|
return this.data || [];
|
|
3858
3860
|
}
|
|
3859
3861
|
}
|
|
3860
|
-
class
|
|
3862
|
+
class EditTableSchema extends Schema {
|
|
3861
3863
|
constructor(props, isCompleteSchema = false) {
|
|
3862
3864
|
const {
|
|
3863
3865
|
initApi,
|
|
@@ -14149,7 +14151,7 @@ function emitSave(fileMapContent) {
|
|
|
14149
14151
|
const buildSchema = (schemaType, api, mainDataSource, moreProps) => {
|
|
14150
14152
|
let schemaObj = null;
|
|
14151
14153
|
if (schemaType === "ftp") {
|
|
14152
|
-
schemaObj = new FtpSchema
|
|
14154
|
+
schemaObj = new FtpSchema({ host: api, title: "" });
|
|
14153
14155
|
const realDataSource = {
|
|
14154
14156
|
...mainDataSource,
|
|
14155
14157
|
type: "ajax",
|
|
@@ -14189,7 +14191,7 @@ const buildSchema = (schemaType, api, mainDataSource, moreProps) => {
|
|
|
14189
14191
|
schemaObj = new DetailSchema({ host: api, title: "", initDataSource: realDataSource });
|
|
14190
14192
|
}
|
|
14191
14193
|
} else if (schemaType === "edit-table") {
|
|
14192
|
-
schemaObj = new
|
|
14194
|
+
schemaObj = new EditTableSchema({ host: api, title: "", ...moreProps });
|
|
14193
14195
|
const realDataSource = {
|
|
14194
14196
|
...mainDataSource,
|
|
14195
14197
|
type: "ajax",
|
|
@@ -28703,7 +28705,7 @@ function getCompAndSchemaFromSchemaJson(schemaJson, customComponent, customSchem
|
|
|
28703
28705
|
}
|
|
28704
28706
|
switch (schemaJson.body.type) {
|
|
28705
28707
|
case "ftp": {
|
|
28706
|
-
return [customComponent || FtpBuild$1, customSchema || FtpSchema
|
|
28708
|
+
return [customComponent || FtpBuild$1, customSchema || FtpSchema];
|
|
28707
28709
|
}
|
|
28708
28710
|
case "formily-form-v2": {
|
|
28709
28711
|
return [customComponent || FormBuild, customSchema || FormilyFormV2Schema];
|
|
@@ -28712,7 +28714,7 @@ function getCompAndSchemaFromSchemaJson(schemaJson, customComponent, customSchem
|
|
|
28712
28714
|
return [customComponent || DetailBuild, customSchema || DetailSchema];
|
|
28713
28715
|
}
|
|
28714
28716
|
case "edit-table": {
|
|
28715
|
-
return [customComponent || FtpBuild, customSchema ||
|
|
28717
|
+
return [customComponent || FtpBuild, customSchema || EditTableSchema];
|
|
28716
28718
|
}
|
|
28717
28719
|
case "blocks-table": {
|
|
28718
28720
|
return [customComponent || BlocksBuild, customSchema || BlocksSchema];
|
|
@@ -28930,4 +28932,4 @@ function getDefaultIndexStyle() {
|
|
|
28930
28932
|
// }
|
|
28931
28933
|
`;
|
|
28932
28934
|
}
|
|
28933
|
-
export { DetailBuild, DetailSchema, EVENT_KEY, FtpBuild as EditTableBuild,
|
|
28935
|
+
export { DetailBuild, DetailSchema, EVENT_KEY, FtpBuild as EditTableBuild, EditTableSchema, FormBuild, FormilyFormV2Schema, FtpBuild$1 as FtpBuild, FtpSchema, MDD_SCHEMA_LS_KEY, PERSISTENT_STORE_LS_KEY, SWAGGER_DT, SWAGGER_FT, SimpleFtp, api2SchemaFromSwagger, api2SchemaFromSwaggerApiInfo, buildFieldsToCompJson, buildSwaggerApiJson, calcWordWidth, MDDEditor as default, getApiInfo, getDefaultFomrLabelAlign, getDefaultIndexScript, getDefaultIndexStyle, getGlobalSizeFromCookie, getLocalProjectSwaggerOpts, getSwaggerInfoFromJson, upperFirst$1 as upperFirst, useModule$1 as useModule, useSchema$1 as useSchema, useSwagger$1 as useSwagger };
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import HeaderToolbar from './header-toolbar';
|
|
|
8
8
|
import buildSwaggerApiJson from '$src/utils/buildSwaggerApiJson';
|
|
9
9
|
import buildFieldsToCompJson from '$src/utils/buildFieldsToCompJson';
|
|
10
10
|
|
|
11
|
-
export default class
|
|
11
|
+
export default class EditTableSchema extends Schema {
|
|
12
12
|
/**
|
|
13
13
|
* @param {*} props
|
|
14
14
|
* type:"edit-table",
|
|
@@ -18,6 +18,7 @@ export default class TableSchema extends JSONWatch {
|
|
|
18
18
|
disableGlobalConfig: false, // 禁用全局分页配置
|
|
19
19
|
},
|
|
20
20
|
maxHeight,
|
|
21
|
+
storageKey = Date.now(),
|
|
21
22
|
} = props || {};
|
|
22
23
|
super({
|
|
23
24
|
columns,
|
|
@@ -31,6 +32,7 @@ export default class TableSchema extends JSONWatch {
|
|
|
31
32
|
useVirtual,
|
|
32
33
|
columnsAutoWidth,
|
|
33
34
|
maxHeight,
|
|
35
|
+
storageKey,
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
38
|
|