@cniot/mdd-editor 0.2.0-beta.7 → 0.2.0-beta.8
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 +18 -18
- package/build/index.es.js +354 -104
- package/build/style.css +1 -1
- package/package.json +1 -1
- package/src/schema/blocks/index.js +79 -0
- package/src/schema/blocks/table.js +58 -0
- package/src/template/blocks/Table.jsx +79 -0
- package/src/template/blocks/index.module.scss +33 -0
- package/src/template/const.js +4 -0
- package/src/utils/swagger/api2SchemaFromSwagger.js +6 -0
package/build/index.es.js
CHANGED
|
@@ -1430,7 +1430,7 @@ function object2Array(obj, pre = "") {
|
|
|
1430
1430
|
};
|
|
1431
1431
|
}).flat(Infinity);
|
|
1432
1432
|
}
|
|
1433
|
-
class TableSchema$
|
|
1433
|
+
class TableSchema$2 extends JSONWatch {
|
|
1434
1434
|
constructor(props) {
|
|
1435
1435
|
const {
|
|
1436
1436
|
columns = [],
|
|
@@ -2637,6 +2637,12 @@ function api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSchema = {}
|
|
|
2637
2637
|
},
|
|
2638
2638
|
headerToolbar: []
|
|
2639
2639
|
};
|
|
2640
|
+
} else if (schemaType === "blocks-table") {
|
|
2641
|
+
result.type = "blocks";
|
|
2642
|
+
result.body = {
|
|
2643
|
+
type: "blocks-table",
|
|
2644
|
+
blocks: []
|
|
2645
|
+
};
|
|
2640
2646
|
}
|
|
2641
2647
|
return merge_1(result, extraSchema);
|
|
2642
2648
|
}
|
|
@@ -2784,7 +2790,7 @@ class FtpSchema$1 extends Schema {
|
|
|
2784
2790
|
this.api = new AjaxSchema(api);
|
|
2785
2791
|
this.filter = new Filter(filter);
|
|
2786
2792
|
this.headerToolbar = new HeaderToolbar$1(headerToolbar);
|
|
2787
|
-
this.table = new TableSchema$
|
|
2793
|
+
this.table = new TableSchema$2(table);
|
|
2788
2794
|
this.initChildren(middleModules, tabs);
|
|
2789
2795
|
this.willDetach = this.initChangeListener();
|
|
2790
2796
|
}
|
|
@@ -2951,7 +2957,93 @@ class FtpSchema$1 extends Schema {
|
|
|
2951
2957
|
}
|
|
2952
2958
|
__publicField(FtpSchema$1, "Filter", Filter);
|
|
2953
2959
|
__publicField(FtpSchema$1, "HeaderToolbar", HeaderToolbar$1);
|
|
2954
|
-
__publicField(FtpSchema$1, "Table", TableSchema$
|
|
2960
|
+
__publicField(FtpSchema$1, "Table", TableSchema$2);
|
|
2961
|
+
class TableSchema$1 extends JSONWatch {
|
|
2962
|
+
constructor(props) {
|
|
2963
|
+
super({
|
|
2964
|
+
columns: props
|
|
2965
|
+
});
|
|
2966
|
+
}
|
|
2967
|
+
setFieldsAll(columns, ignoreUpdate = false) {
|
|
2968
|
+
this.set("columns", columns, ignoreUpdate);
|
|
2969
|
+
}
|
|
2970
|
+
setItemAll(value, type = "columns", ignoreUpdate = false) {
|
|
2971
|
+
this.set(type, value, ignoreUpdate);
|
|
2972
|
+
}
|
|
2973
|
+
add(field, key = "columns", ignoreUpdate = false) {
|
|
2974
|
+
this.data[key].push(field);
|
|
2975
|
+
this.emit("$updated", null, ignoreUpdate);
|
|
2976
|
+
}
|
|
2977
|
+
remove(index2, key = "columns", ignoreUpdate = false) {
|
|
2978
|
+
this.data[key].splice(index2, 1);
|
|
2979
|
+
this.emit("$updated", null, ignoreUpdate);
|
|
2980
|
+
}
|
|
2981
|
+
update(index2, data, key = "columns", ignoreUpdate = false) {
|
|
2982
|
+
if (["columns", "actionColumns", "bulkActions"].includes(key)) {
|
|
2983
|
+
this.data[key].splice(index2, 1, data);
|
|
2984
|
+
} else {
|
|
2985
|
+
this.data[key] = data;
|
|
2986
|
+
}
|
|
2987
|
+
this.emit("$updated", null, ignoreUpdate);
|
|
2988
|
+
}
|
|
2989
|
+
updateAll(data) {
|
|
2990
|
+
this.data = data;
|
|
2991
|
+
this.emit("$updated");
|
|
2992
|
+
}
|
|
2993
|
+
delete() {
|
|
2994
|
+
}
|
|
2995
|
+
getJSON() {
|
|
2996
|
+
return super.getJSON();
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
class BlocksSchema extends Schema {
|
|
3000
|
+
constructor(props, isCompleteSchema = false) {
|
|
3001
|
+
const { type, blocks, ...more2 } = isCompleteSchema ? props.body : props;
|
|
3002
|
+
super(more2);
|
|
3003
|
+
this.type = type;
|
|
3004
|
+
this.blocks = new TableSchema$1(blocks);
|
|
3005
|
+
this.willDetach = this.initChangeListener();
|
|
3006
|
+
}
|
|
3007
|
+
initChangeListener() {
|
|
3008
|
+
const fun = () => {
|
|
3009
|
+
super.emit(EVENT_KEY.SCHEMA_UPDATE, { schemaJson: this.getAllJSON(), schema: this });
|
|
3010
|
+
};
|
|
3011
|
+
this.blocks.on("$updated", fun);
|
|
3012
|
+
return () => {
|
|
3013
|
+
this.blocks.off("$updated", fun);
|
|
3014
|
+
};
|
|
3015
|
+
}
|
|
3016
|
+
initFromCache(schema) {
|
|
3017
|
+
const { body, ...more2 } = schema;
|
|
3018
|
+
const { blocks } = body;
|
|
3019
|
+
if (this.willDetach) {
|
|
3020
|
+
this.willDetach();
|
|
3021
|
+
}
|
|
3022
|
+
this.init(more2);
|
|
3023
|
+
this.blocks.updateAll(blocks);
|
|
3024
|
+
this.willDetach = this.initChangeListener();
|
|
3025
|
+
}
|
|
3026
|
+
getSchemaType() {
|
|
3027
|
+
return this.type;
|
|
3028
|
+
}
|
|
3029
|
+
getTablePanel() {
|
|
3030
|
+
return this.blocks;
|
|
3031
|
+
}
|
|
3032
|
+
getAllJSON() {
|
|
3033
|
+
const res = super.getAllJSON();
|
|
3034
|
+
return { ...res, type: "blocks" };
|
|
3035
|
+
}
|
|
3036
|
+
toJSON() {
|
|
3037
|
+
return {
|
|
3038
|
+
type: this.type,
|
|
3039
|
+
blocks: this.blocks.getJSON().columns
|
|
3040
|
+
};
|
|
3041
|
+
}
|
|
3042
|
+
setBlocks(blocks) {
|
|
3043
|
+
this.blocks = blocks;
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
__publicField(BlocksSchema, "Table", TableSchema$1);
|
|
2955
3047
|
class FormInfo extends JSONWatch {
|
|
2956
3048
|
constructor(props) {
|
|
2957
3049
|
const {
|
|
@@ -7723,7 +7815,7 @@ const dsTitleWatch$1 = "_dsTitleWatch_mxilv_32";
|
|
|
7723
7815
|
const staticValueOkBtn$1 = "_staticValueOkBtn_mxilv_37";
|
|
7724
7816
|
const tableDeleteBtn$1 = "_tableDeleteBtn_mxilv_41";
|
|
7725
7817
|
const secondConfirm$1 = "_secondConfirm_mxilv_45";
|
|
7726
|
-
var styles$
|
|
7818
|
+
var styles$e = {
|
|
7727
7819
|
dsType: dsType$1,
|
|
7728
7820
|
dsJSONContent: dsJSONContent$1,
|
|
7729
7821
|
dsJSONContentTip: dsJSONContentTip$1,
|
|
@@ -14623,7 +14715,7 @@ function DataSourceSelect(props) {
|
|
|
14623
14715
|
size: "small",
|
|
14624
14716
|
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
14625
14717
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
14626
|
-
className: styles$
|
|
14718
|
+
className: styles$e.staticValueOkBtn,
|
|
14627
14719
|
size: "small",
|
|
14628
14720
|
onClick: onOkQuery
|
|
14629
14721
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "$TABLE.RECORD_DATA" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -14634,7 +14726,7 @@ function DataSourceSelect(props) {
|
|
|
14634
14726
|
size: "small",
|
|
14635
14727
|
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
14636
14728
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
14637
|
-
className: styles$
|
|
14729
|
+
className: styles$e.staticValueOkBtn,
|
|
14638
14730
|
size: "small",
|
|
14639
14731
|
onClick: onOkRecordData
|
|
14640
14732
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "$PARAMS" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -14645,7 +14737,7 @@ function DataSourceSelect(props) {
|
|
|
14645
14737
|
size: "small",
|
|
14646
14738
|
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
14647
14739
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
14648
|
-
className: styles$
|
|
14740
|
+
className: styles$e.staticValueOkBtn,
|
|
14649
14741
|
size: "small",
|
|
14650
14742
|
onClick: onOkParams
|
|
14651
14743
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "staticValue" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -14656,7 +14748,7 @@ function DataSourceSelect(props) {
|
|
|
14656
14748
|
placeholder: "\u8BF7\u8F93\u5165\u503C",
|
|
14657
14749
|
size: "small"
|
|
14658
14750
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
14659
|
-
className: styles$
|
|
14751
|
+
className: styles$e.staticValueOkBtn,
|
|
14660
14752
|
size: "small",
|
|
14661
14753
|
onClick: onOkStatic
|
|
14662
14754
|
}, "\u786E\u5B9A")) : null) : null);
|
|
@@ -14685,12 +14777,12 @@ function DataSourceSelect(props) {
|
|
|
14685
14777
|
type: "primary",
|
|
14686
14778
|
text: true,
|
|
14687
14779
|
size: "small",
|
|
14688
|
-
className: styles$
|
|
14780
|
+
className: styles$e.tableDeleteBtn,
|
|
14689
14781
|
onClick: () => commonTableDelete(value2, index2, record, "params")
|
|
14690
14782
|
}, "\u5220\u9664"));
|
|
14691
14783
|
};
|
|
14692
14784
|
return /* @__PURE__ */ React$1.createElement("div", null, /* @__PURE__ */ React$1.createElement("div", {
|
|
14693
|
-
className: styles$
|
|
14785
|
+
className: styles$e.dsTitle
|
|
14694
14786
|
}, "\u5165\u53C2:"), /* @__PURE__ */ React$1.createElement("div", {
|
|
14695
14787
|
style: { marginBottom: 8 }
|
|
14696
14788
|
}, /* @__PURE__ */ React$1.createElement(Button, {
|
|
@@ -14724,9 +14816,9 @@ function DataSourceSelect(props) {
|
|
|
14724
14816
|
};
|
|
14725
14817
|
const renderWatch = () => {
|
|
14726
14818
|
return /* @__PURE__ */ React$1.createElement("div", {
|
|
14727
|
-
className: styles$
|
|
14819
|
+
className: styles$e.watchContainer
|
|
14728
14820
|
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
14729
|
-
className: styles$
|
|
14821
|
+
className: styles$e.dsTitleWatch
|
|
14730
14822
|
}, "\u89E6\u53D1\u65F6\u673A:"), /* @__PURE__ */ React$1.createElement(Select$2, {
|
|
14731
14823
|
mode: "multiple",
|
|
14732
14824
|
showSearch: true,
|
|
@@ -15004,7 +15096,7 @@ function DataSourceSelect(props) {
|
|
|
15004
15096
|
placeholder: "\u8BF7\u8F93\u5165\u503C",
|
|
15005
15097
|
size: "small"
|
|
15006
15098
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15007
|
-
className: styles$
|
|
15099
|
+
className: styles$e.staticValueOkBtn,
|
|
15008
15100
|
size: "small",
|
|
15009
15101
|
onClick: onOkQuery
|
|
15010
15102
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "staticValue" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -15015,7 +15107,7 @@ function DataSourceSelect(props) {
|
|
|
15015
15107
|
placeholder: "\u8BF7\u8F93\u5165\u503C",
|
|
15016
15108
|
size: "small"
|
|
15017
15109
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15018
|
-
className: styles$
|
|
15110
|
+
className: styles$e.staticValueOkBtn,
|
|
15019
15111
|
size: "small",
|
|
15020
15112
|
onClick: onOkStatic
|
|
15021
15113
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "$RET" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -15026,7 +15118,7 @@ function DataSourceSelect(props) {
|
|
|
15026
15118
|
placeholder: "\u8BF7\u8F93\u5165\u503C",
|
|
15027
15119
|
size: "small"
|
|
15028
15120
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15029
|
-
className: styles$
|
|
15121
|
+
className: styles$e.staticValueOkBtn,
|
|
15030
15122
|
size: "small",
|
|
15031
15123
|
onClick: onOkRet
|
|
15032
15124
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "$PARAMS" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -15037,7 +15129,7 @@ function DataSourceSelect(props) {
|
|
|
15037
15129
|
size: "small",
|
|
15038
15130
|
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
15039
15131
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15040
|
-
className: styles$
|
|
15132
|
+
className: styles$e.staticValueOkBtn,
|
|
15041
15133
|
size: "small",
|
|
15042
15134
|
onClick: onOkParams
|
|
15043
15135
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "$TABLE.RECORD_DATA" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -15048,7 +15140,7 @@ function DataSourceSelect(props) {
|
|
|
15048
15140
|
size: "small",
|
|
15049
15141
|
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
15050
15142
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15051
|
-
className: styles$
|
|
15143
|
+
className: styles$e.staticValueOkBtn,
|
|
15052
15144
|
size: "small",
|
|
15053
15145
|
onClick: onOkRecordData
|
|
15054
15146
|
}, "\u786E\u5B9A")) : null) : null);
|
|
@@ -15086,9 +15178,9 @@ function DataSourceSelect(props) {
|
|
|
15086
15178
|
}, "\u5220\u9664");
|
|
15087
15179
|
};
|
|
15088
15180
|
return /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement("div", {
|
|
15089
|
-
className: styles$
|
|
15181
|
+
className: styles$e.dsTitle
|
|
15090
15182
|
}, "\u683C\u5F0F\u5316\u51FA\u53C2:"), /* @__PURE__ */ React$1.createElement("div", {
|
|
15091
|
-
className: styles$
|
|
15183
|
+
className: styles$e.actionButton
|
|
15092
15184
|
}, /* @__PURE__ */ React$1.createElement(Button, {
|
|
15093
15185
|
onClick: onResponseAdd,
|
|
15094
15186
|
size: "small"
|
|
@@ -15118,9 +15210,9 @@ function DataSourceSelect(props) {
|
|
|
15118
15210
|
})));
|
|
15119
15211
|
};
|
|
15120
15212
|
return /* @__PURE__ */ React$1.createElement("div", {
|
|
15121
|
-
className: styles$
|
|
15213
|
+
className: styles$e.dsContainer
|
|
15122
15214
|
}, hasExtra && !defaultAjax ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement("div", {
|
|
15123
|
-
className: styles$
|
|
15215
|
+
className: styles$e.dsType
|
|
15124
15216
|
}, /* @__PURE__ */ React$1.createElement(RadioGroup$1, {
|
|
15125
15217
|
value: typeValue,
|
|
15126
15218
|
onChange: onTypeChange,
|
|
@@ -15150,9 +15242,9 @@ function DataSourceSelect(props) {
|
|
|
15150
15242
|
filter: mainDataSourceFilter,
|
|
15151
15243
|
...selectProps
|
|
15152
15244
|
}) : null, hasExtra && typeValue === "json" ? /* @__PURE__ */ React$1.createElement("div", {
|
|
15153
|
-
className: styles$
|
|
15245
|
+
className: styles$e.dsJSONContent
|
|
15154
15246
|
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
15155
|
-
className: styles$
|
|
15247
|
+
className: styles$e.dsJSONContentTip
|
|
15156
15248
|
}, "\u8BF7\u8F93\u5165json(\u63D0\u793A\uFF1Ajson\u7684key\u9700\u8981\u52A0\u4E0A\u53CC\u5F15\u53F7)"), /* @__PURE__ */ React$1.createElement(MonacoEditor, {
|
|
15157
15249
|
value: codeMirrorJsonObj,
|
|
15158
15250
|
onChange: (v2, viewUpdate) => {
|
|
@@ -15165,9 +15257,9 @@ function DataSourceSelect(props) {
|
|
|
15165
15257
|
}
|
|
15166
15258
|
}
|
|
15167
15259
|
})) : null, hasExtra && typeValue === "ajax" ? /* @__PURE__ */ React$1.createElement("div", {
|
|
15168
|
-
className: styles$
|
|
15260
|
+
className: styles$e.dsAjaxContent
|
|
15169
15261
|
}, showWatch && !defaultAjax && renderWatch(), renderParamsTable(), renderFormatResponse()) : null, hasExtra && showSecondConfirm && typeValue === "ajax" ? /* @__PURE__ */ React$1.createElement("div", {
|
|
15170
|
-
className: styles$
|
|
15262
|
+
className: styles$e.secondConfirm
|
|
15171
15263
|
}, /* @__PURE__ */ React$1.createElement(Checkbox, {
|
|
15172
15264
|
checked: secondConfirmValue,
|
|
15173
15265
|
onChange: secondConfirmChange
|
|
@@ -15198,7 +15290,7 @@ const dsTitleWatch = "_dsTitleWatch_1islj_28";
|
|
|
15198
15290
|
const staticValueOkBtn = "_staticValueOkBtn_1islj_33";
|
|
15199
15291
|
const tableDeleteBtn = "_tableDeleteBtn_1islj_37";
|
|
15200
15292
|
const secondConfirm = "_secondConfirm_1islj_41";
|
|
15201
|
-
var styles$
|
|
15293
|
+
var styles$d = {
|
|
15202
15294
|
dsType,
|
|
15203
15295
|
dsJSONContent,
|
|
15204
15296
|
dsJSONContentTip,
|
|
@@ -15561,7 +15653,7 @@ function ParamsSelect(props) {
|
|
|
15561
15653
|
size: "small",
|
|
15562
15654
|
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
15563
15655
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15564
|
-
className: styles$
|
|
15656
|
+
className: styles$d.staticValueOkBtn,
|
|
15565
15657
|
size: "small",
|
|
15566
15658
|
onClick: onOkQuery
|
|
15567
15659
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "$PARAMS" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -15572,7 +15664,7 @@ function ParamsSelect(props) {
|
|
|
15572
15664
|
size: "small",
|
|
15573
15665
|
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
15574
15666
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15575
|
-
className: styles$
|
|
15667
|
+
className: styles$d.staticValueOkBtn,
|
|
15576
15668
|
size: "small",
|
|
15577
15669
|
onClick: onOkParams
|
|
15578
15670
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "$TABLE.RECORD_DATA" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -15583,7 +15675,7 @@ function ParamsSelect(props) {
|
|
|
15583
15675
|
size: "small",
|
|
15584
15676
|
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
15585
15677
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15586
|
-
className: styles$
|
|
15678
|
+
className: styles$d.staticValueOkBtn,
|
|
15587
15679
|
size: "small",
|
|
15588
15680
|
onClick: onOkRecordData
|
|
15589
15681
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "$FORM" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -15594,7 +15686,7 @@ function ParamsSelect(props) {
|
|
|
15594
15686
|
size: "small",
|
|
15595
15687
|
placeholder: "\u8BF7\u8F93\u5165\u503C"
|
|
15596
15688
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15597
|
-
className: styles$
|
|
15689
|
+
className: styles$d.staticValueOkBtn,
|
|
15598
15690
|
size: "small",
|
|
15599
15691
|
onClick: onOkForm
|
|
15600
15692
|
}, "\u786E\u5B9A")) : null, panelSelectValue === "staticValue" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
@@ -15605,7 +15697,7 @@ function ParamsSelect(props) {
|
|
|
15605
15697
|
placeholder: "\u8BF7\u8F93\u5165\u503C",
|
|
15606
15698
|
size: "small"
|
|
15607
15699
|
}), /* @__PURE__ */ React$1.createElement(Button, {
|
|
15608
|
-
className: styles$
|
|
15700
|
+
className: styles$d.staticValueOkBtn,
|
|
15609
15701
|
size: "small",
|
|
15610
15702
|
onClick: onOkStatic
|
|
15611
15703
|
}, "\u786E\u5B9A")) : null) : null);
|
|
@@ -15634,7 +15726,7 @@ function ParamsSelect(props) {
|
|
|
15634
15726
|
type: "primary",
|
|
15635
15727
|
text: true,
|
|
15636
15728
|
size: "small",
|
|
15637
|
-
className: styles$
|
|
15729
|
+
className: styles$d.tableDeleteBtn,
|
|
15638
15730
|
onClick: () => commonTableDelete(value2, index2, record, "params")
|
|
15639
15731
|
}, "\u5220\u9664"));
|
|
15640
15732
|
};
|
|
@@ -15662,9 +15754,9 @@ function ParamsSelect(props) {
|
|
|
15662
15754
|
})));
|
|
15663
15755
|
};
|
|
15664
15756
|
return /* @__PURE__ */ React$1.createElement("div", {
|
|
15665
|
-
className: styles$
|
|
15757
|
+
className: styles$d.dsContainer
|
|
15666
15758
|
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
15667
|
-
className: styles$
|
|
15759
|
+
className: styles$d.dsAjaxContent
|
|
15668
15760
|
}, renderParamsTable()));
|
|
15669
15761
|
}
|
|
15670
15762
|
const { connect: connect$7, mapReadPretty: mapReadPretty$6, mapProps: mapProps$7 } = formilyReact;
|
|
@@ -15838,7 +15930,7 @@ Select$1.AutoComplete = connect$4(
|
|
|
15838
15930
|
);
|
|
15839
15931
|
const container = "_container_t9q14_1";
|
|
15840
15932
|
const footer = "_footer_t9q14_8";
|
|
15841
|
-
var styles$
|
|
15933
|
+
var styles$c = {
|
|
15842
15934
|
container,
|
|
15843
15935
|
footer
|
|
15844
15936
|
};
|
|
@@ -15938,14 +16030,14 @@ const FormilyForm = (props) => {
|
|
|
15938
16030
|
fixedSpan: 8
|
|
15939
16031
|
},
|
|
15940
16032
|
size: "small",
|
|
15941
|
-
className: styles$
|
|
16033
|
+
className: styles$c.container
|
|
15942
16034
|
},
|
|
15943
16035
|
...restProps
|
|
15944
16036
|
}, /* @__PURE__ */ React$1.createElement(SchemaField, {
|
|
15945
16037
|
components,
|
|
15946
16038
|
schema: schema == null ? void 0 : schema.schema
|
|
15947
16039
|
}), children, !hiddenSubmit && /* @__PURE__ */ React$1.createElement("div", {
|
|
15948
|
-
className: styles$
|
|
16040
|
+
className: styles$c.footer
|
|
15949
16041
|
}, /* @__PURE__ */ React$1.createElement(Submit, {
|
|
15950
16042
|
...SubmitProps
|
|
15951
16043
|
}, "\u63D0\u4EA4")));
|
|
@@ -19258,6 +19350,53 @@ var cnGraphicsPercent = (params) => {
|
|
|
19258
19350
|
}
|
|
19259
19351
|
};
|
|
19260
19352
|
};
|
|
19353
|
+
var BlocksTable = (params) => {
|
|
19354
|
+
const { blocksDataSource = [] } = params || {};
|
|
19355
|
+
return {
|
|
19356
|
+
form: {
|
|
19357
|
+
labelCol: 6,
|
|
19358
|
+
wrapperCol: 16
|
|
19359
|
+
},
|
|
19360
|
+
schema: {
|
|
19361
|
+
type: "object",
|
|
19362
|
+
properties: {
|
|
19363
|
+
blockPath: {
|
|
19364
|
+
title: "\u533A\u5757\u5730\u5740",
|
|
19365
|
+
"x-decorator": "CnFormItem",
|
|
19366
|
+
"x-component": "FormilySelect.AutoComplete",
|
|
19367
|
+
"x-validator": [],
|
|
19368
|
+
"x-component-props": {
|
|
19369
|
+
placeholder: "\u8BF7\u9009\u62E9\u6216\u8005\u8F93\u5165\u533A\u5757\u5730\u5740",
|
|
19370
|
+
hasClear: true,
|
|
19371
|
+
size: "small",
|
|
19372
|
+
style: {
|
|
19373
|
+
width: "100%"
|
|
19374
|
+
}
|
|
19375
|
+
},
|
|
19376
|
+
"x-decorator-props": {},
|
|
19377
|
+
name: "blockPath",
|
|
19378
|
+
enum: blocksDataSource || [],
|
|
19379
|
+
default: "",
|
|
19380
|
+
"x-designable-id": "9efgulzttsh"
|
|
19381
|
+
},
|
|
19382
|
+
parentDataIndex: {
|
|
19383
|
+
type: "string",
|
|
19384
|
+
title: "\u7236\u7EA7 dataIndex",
|
|
19385
|
+
"x-decorator": "CnFormItem",
|
|
19386
|
+
"x-component": "Input",
|
|
19387
|
+
"x-validator": [],
|
|
19388
|
+
"x-component-props": {},
|
|
19389
|
+
"x-decorator-props": {
|
|
19390
|
+
tip: "\u6E32\u67D3\u533A\u5757\u7684\u6BCF\u4E2A\u5217\u65F6\uFF0C\u6307\u5B9A\u7236\u7EA7\u53D6\u503C\u7684key\u3002\u4F18\u5148\u7EA7 \u5927\u4E8E \u5F53\u524D\u5217\u914D\u7F6E\u7684dataIndex\u3002\u82E5\u5747\u4E3A\u914D\u7F6E \u5219\u9ED8\u8BA4\u5E73\u94FA\u3002\u4F8B\u5982\uFF1A\u533A\u5757\u5217\u4E2D\u7B2C\u4E00\u5217 \u7684 dataIndex \u4E3A name\uFF0CparentDataIndex \u4E3A ownerDto\uFF0C\u5219\u8BE5\u5217\u6E32\u67D3\u65F6\u7684\u5B9E\u9645 dataIndex \u4E3A ownerDto.name"
|
|
19391
|
+
},
|
|
19392
|
+
name: "parentDataIndex",
|
|
19393
|
+
"x-designable-id": "sxbti2p222233122mzk"
|
|
19394
|
+
},
|
|
19395
|
+
"x-designable-id": "loa5555d8t3"
|
|
19396
|
+
}
|
|
19397
|
+
}
|
|
19398
|
+
};
|
|
19399
|
+
};
|
|
19261
19400
|
var Columns = {
|
|
19262
19401
|
text: TextSchema,
|
|
19263
19402
|
tpl: TplSchema,
|
|
@@ -19275,7 +19414,8 @@ var Columns = {
|
|
|
19275
19414
|
"cn-bank": CnBank,
|
|
19276
19415
|
"cn-image-text": CnImageText,
|
|
19277
19416
|
"cn-progress": CnProgress,
|
|
19278
|
-
"cn-graphics-percent": cnGraphicsPercent
|
|
19417
|
+
"cn-graphics-percent": cnGraphicsPercent,
|
|
19418
|
+
"blocks-table": BlocksTable
|
|
19279
19419
|
};
|
|
19280
19420
|
var TablePagination = {
|
|
19281
19421
|
form: {
|
|
@@ -23792,7 +23932,7 @@ const itemComponent$1 = "_itemComponent_tl8oe_70";
|
|
|
23792
23932
|
const itemLabel$1 = "_itemLabel_tl8oe_76";
|
|
23793
23933
|
const collapseContent$2 = "_collapseContent_tl8oe_81";
|
|
23794
23934
|
const itemClose$2 = "_itemClose_tl8oe_85";
|
|
23795
|
-
var styles$
|
|
23935
|
+
var styles$b = {
|
|
23796
23936
|
mddTableForm,
|
|
23797
23937
|
tableFormTitle,
|
|
23798
23938
|
tableFormContent,
|
|
@@ -23870,7 +24010,7 @@ const TitleRender$2 = (props) => {
|
|
|
23870
24010
|
setValue({ ...value });
|
|
23871
24011
|
onChange(value, key);
|
|
23872
24012
|
};
|
|
23873
|
-
const cls = classnames.bind(styles$
|
|
24013
|
+
const cls = classnames.bind(styles$b)({
|
|
23874
24014
|
itemTitle: "itemTitle",
|
|
23875
24015
|
"drop-over-upward": isOver && index2 < sourceItem.index,
|
|
23876
24016
|
"drop-over-downward": isOver && index2 > sourceItem.index
|
|
@@ -23886,9 +24026,9 @@ const TitleRender$2 = (props) => {
|
|
|
23886
24026
|
onChange: (v2) => titleChange("label", v2),
|
|
23887
24027
|
placeholder: "\u8F93\u5165\u4E2D\u6587\u540D"
|
|
23888
24028
|
}), titleType.includes("type") && /* @__PURE__ */ React$1.createElement("div", {
|
|
23889
|
-
className: styles$
|
|
24029
|
+
className: styles$b.itemComponent
|
|
23890
24030
|
}, /* @__PURE__ */ React$1.createElement("label", {
|
|
23891
|
-
className: styles$
|
|
24031
|
+
className: styles$b.itemLabel
|
|
23892
24032
|
}, "\u7EC4\u4EF6: "), /* @__PURE__ */ React$1.createElement(Select$2, {
|
|
23893
24033
|
size: "small",
|
|
23894
24034
|
autoWidth: false,
|
|
@@ -23907,9 +24047,9 @@ const TitleRender$2 = (props) => {
|
|
|
23907
24047
|
onChange: (v2) => titleChange("name", v2),
|
|
23908
24048
|
placeholder: "\u8BF7\u9009\u62E9\u6216\u8005\u8F93\u5165\u53D8\u91CF\u540D"
|
|
23909
24049
|
}), titleType.includes("groupKey") && /* @__PURE__ */ React$1.createElement("div", {
|
|
23910
|
-
className: styles$
|
|
24050
|
+
className: styles$b.itemComponent
|
|
23911
24051
|
}, /* @__PURE__ */ React$1.createElement("label", {
|
|
23912
|
-
className: styles$
|
|
24052
|
+
className: styles$b.itemLabel
|
|
23913
24053
|
}, "\u5206\u7EC4: "), /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
23914
24054
|
size: "small",
|
|
23915
24055
|
value: groupKey,
|
|
@@ -23918,7 +24058,7 @@ const TitleRender$2 = (props) => {
|
|
|
23918
24058
|
})), /* @__PURE__ */ React$1.createElement(Icon, {
|
|
23919
24059
|
type: "close",
|
|
23920
24060
|
size: "small",
|
|
23921
|
-
className: styles$
|
|
24061
|
+
className: styles$b.itemClose,
|
|
23922
24062
|
onClick: onRemove
|
|
23923
24063
|
}));
|
|
23924
24064
|
};
|
|
@@ -23935,6 +24075,7 @@ const ContentRender$2 = (props) => {
|
|
|
23935
24075
|
const [uuid, setUuid] = useState(uuidv4());
|
|
23936
24076
|
const { dataMap, getModule } = useModule$1();
|
|
23937
24077
|
const moduleDataSource = getModule("$ModuleDataSource");
|
|
24078
|
+
const blocksDataSource = getModule("$BlocksDataSource");
|
|
23938
24079
|
React$1.useEffect(
|
|
23939
24080
|
debounce_1(() => {
|
|
23940
24081
|
setUuid(uuidv4());
|
|
@@ -23942,7 +24083,7 @@ const ContentRender$2 = (props) => {
|
|
|
23942
24083
|
[watchFields(listSchema)]
|
|
23943
24084
|
);
|
|
23944
24085
|
const realSchema = useMemo(() => {
|
|
23945
|
-
const srcSchema = getRealSchema(formilySchema2 || schema, { moduleDataSource, listSchema });
|
|
24086
|
+
const srcSchema = getRealSchema(formilySchema2 || schema, { moduleDataSource, listSchema, blocksDataSource });
|
|
23946
24087
|
return getRealCompSchema(srcSchema, extraFieldSchema2);
|
|
23947
24088
|
}, [formilySchema2, schema, extraFieldSchema2, moduleDataSource, uuid, listSchema]);
|
|
23948
24089
|
const formilyForm = useMemo(() => {
|
|
@@ -23970,7 +24111,7 @@ const ContentRender$2 = (props) => {
|
|
|
23970
24111
|
};
|
|
23971
24112
|
}, [type, updateForceFLag, realSchema]);
|
|
23972
24113
|
return /* @__PURE__ */ React$1.createElement("div", {
|
|
23973
|
-
className: styles$
|
|
24114
|
+
className: styles$b.collapseContent
|
|
23974
24115
|
}, /* @__PURE__ */ React$1.createElement(FormilyForm$1, {
|
|
23975
24116
|
...formilyForm,
|
|
23976
24117
|
hiddenSubmit: true
|
|
@@ -24045,9 +24186,9 @@ function MddTableForm(props, ref) {
|
|
|
24045
24186
|
forceUpdate();
|
|
24046
24187
|
};
|
|
24047
24188
|
return /* @__PURE__ */ React$1.createElement("div", {
|
|
24048
|
-
className: styles$
|
|
24189
|
+
className: styles$b.mddTableForm
|
|
24049
24190
|
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
24050
|
-
className: styles$
|
|
24191
|
+
className: styles$b.tableFormTitle
|
|
24051
24192
|
}, /* @__PURE__ */ React$1.createElement("div", null, title2, tip && /* @__PURE__ */ React$1.createElement(Tooltip, {
|
|
24052
24193
|
trigger: /* @__PURE__ */ React$1.createElement(Icon, {
|
|
24053
24194
|
type: "help",
|
|
@@ -24055,9 +24196,9 @@ function MddTableForm(props, ref) {
|
|
|
24055
24196
|
}),
|
|
24056
24197
|
align: "t"
|
|
24057
24198
|
}, tip)), actionContent && /* @__PURE__ */ React$1.createElement("div", {
|
|
24058
|
-
className: styles$
|
|
24199
|
+
className: styles$b.tableFormAction
|
|
24059
24200
|
}, actionContent)), /* @__PURE__ */ React$1.createElement("div", {
|
|
24060
|
-
className: styles$
|
|
24201
|
+
className: styles$b.tableFormContent
|
|
24061
24202
|
}, /* @__PURE__ */ React$1.createElement(DndProvider, {
|
|
24062
24203
|
backend: HTML5Backend
|
|
24063
24204
|
}, /* @__PURE__ */ React$1.createElement(Collapse, {
|
|
@@ -24099,7 +24240,7 @@ function MddTableForm(props, ref) {
|
|
|
24099
24240
|
}
|
|
24100
24241
|
}));
|
|
24101
24242
|
})))), /* @__PURE__ */ React$1.createElement("div", {
|
|
24102
|
-
className: styles$
|
|
24243
|
+
className: styles$b.tableFormBottom
|
|
24103
24244
|
}, /* @__PURE__ */ React$1.createElement(Button, {
|
|
24104
24245
|
onClick: onAddHandle,
|
|
24105
24246
|
style: { padding: "0 48px" }
|
|
@@ -24139,7 +24280,7 @@ const FormTitle = "_FormTitle_1e2nn_20";
|
|
|
24139
24280
|
const FormTitleHelp = "_FormTitleHelp_1e2nn_24";
|
|
24140
24281
|
const FormContent = "_FormContent_1e2nn_30";
|
|
24141
24282
|
const content = "_content_1e2nn_35";
|
|
24142
|
-
var styles$
|
|
24283
|
+
var styles$a = {
|
|
24143
24284
|
mddForm,
|
|
24144
24285
|
FormTitle,
|
|
24145
24286
|
FormTitleHelp,
|
|
@@ -24169,7 +24310,7 @@ const ContentRender$1 = (props) => {
|
|
|
24169
24310
|
};
|
|
24170
24311
|
}, [schema]);
|
|
24171
24312
|
return /* @__PURE__ */ React$1.createElement("div", {
|
|
24172
|
-
className: styles$
|
|
24313
|
+
className: styles$a.content
|
|
24173
24314
|
}, /* @__PURE__ */ React$1.createElement(FormilyForm$1, {
|
|
24174
24315
|
...formilyForm,
|
|
24175
24316
|
hiddenSubmit: true
|
|
@@ -24189,14 +24330,14 @@ function MddForm(props) {
|
|
|
24189
24330
|
contentStyle
|
|
24190
24331
|
} = props;
|
|
24191
24332
|
return /* @__PURE__ */ React$1.createElement("div", {
|
|
24192
|
-
className: styles$
|
|
24333
|
+
className: styles$a.mddForm,
|
|
24193
24334
|
style: style2
|
|
24194
24335
|
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
24195
|
-
className: styles$
|
|
24336
|
+
className: styles$a.FormTitle
|
|
24196
24337
|
}, title2), help && /* @__PURE__ */ React$1.createElement("div", {
|
|
24197
|
-
className: styles$
|
|
24338
|
+
className: styles$a.FormTitleHelp
|
|
24198
24339
|
}, help), /* @__PURE__ */ React$1.createElement("div", {
|
|
24199
|
-
className: styles$
|
|
24340
|
+
className: styles$a.FormContent,
|
|
24200
24341
|
style: contentStyle
|
|
24201
24342
|
}, children || /* @__PURE__ */ React$1.createElement(ContentRender$1, {
|
|
24202
24343
|
values: data,
|
|
@@ -24324,6 +24465,10 @@ const columnsTypeOptions = [
|
|
|
24324
24465
|
value: "images",
|
|
24325
24466
|
label: "\u9644\u4EF6/\u56FE\u7247"
|
|
24326
24467
|
},
|
|
24468
|
+
{
|
|
24469
|
+
value: "blocks-table",
|
|
24470
|
+
label: "\u5217\u8868\u533A\u5757"
|
|
24471
|
+
},
|
|
24327
24472
|
{
|
|
24328
24473
|
value: "custom",
|
|
24329
24474
|
label: "\u81EA\u5B9A\u4E49"
|
|
@@ -24609,7 +24754,7 @@ function HeaderToolbarPanel$1({ schema, moduleMap }) {
|
|
|
24609
24754
|
}
|
|
24610
24755
|
}));
|
|
24611
24756
|
}
|
|
24612
|
-
function TablePanel$
|
|
24757
|
+
function TablePanel$3({ schema, swaggerFields = [] }) {
|
|
24613
24758
|
var _a2;
|
|
24614
24759
|
const columnMddFormRef = React$1.useRef();
|
|
24615
24760
|
const bulkMddFormRef = React$1.useRef();
|
|
@@ -24620,7 +24765,7 @@ function TablePanel$2({ schema, swaggerFields = [] }) {
|
|
|
24620
24765
|
schema.on("$updated", (changeData, ignoreUpdate) => {
|
|
24621
24766
|
!ignoreUpdate && forceUpdate({});
|
|
24622
24767
|
});
|
|
24623
|
-
hackRowDetail(schema);
|
|
24768
|
+
hackRowDetail$1(schema);
|
|
24624
24769
|
}, []);
|
|
24625
24770
|
const primaryKey = schema.get("primaryKey");
|
|
24626
24771
|
const bulkActions = schema.get("bulkActions");
|
|
@@ -24904,7 +25049,7 @@ function TablePanel$2({ schema, swaggerFields = [] }) {
|
|
|
24904
25049
|
type: "prompt"
|
|
24905
25050
|
}), " \u5982\u679C\u6709\u6027\u80FD\u95EE\u9898\u53EF\u4EE5\u5173\u95ED\u8BE5\u5C5E\u6027\uFF0C\u540C\u65F6\u624B\u52A8\u8BBE\u7F6E\u5217\u5BBD")));
|
|
24906
25051
|
}
|
|
24907
|
-
function hackRowDetail(schema) {
|
|
25052
|
+
function hackRowDetail$1(schema) {
|
|
24908
25053
|
const rowDetail = schema.get("rowDetail");
|
|
24909
25054
|
if (rowDetail) {
|
|
24910
25055
|
schema.set("rowDetail", void 0);
|
|
@@ -25165,7 +25310,7 @@ const tableArrayBottom$1 = "_tableArrayBottom_16ght_32";
|
|
|
25165
25310
|
const itemTitle$1 = "_itemTitle_16ght_39";
|
|
25166
25311
|
const collapseContent$1 = "_collapseContent_16ght_69";
|
|
25167
25312
|
const itemClose$1 = "_itemClose_16ght_73";
|
|
25168
|
-
var styles$
|
|
25313
|
+
var styles$9 = {
|
|
25169
25314
|
mddTableArray: mddTableArray$1,
|
|
25170
25315
|
tableArrayTitle: tableArrayTitle$1,
|
|
25171
25316
|
tableArrayContent: tableArrayContent$1,
|
|
@@ -25210,7 +25355,7 @@ const TitleRender$1 = (props) => {
|
|
|
25210
25355
|
});
|
|
25211
25356
|
const opacity = isDragging ? 0 : 1;
|
|
25212
25357
|
draggable && drag(drop(ref));
|
|
25213
|
-
const cls = classnames.bind(styles$
|
|
25358
|
+
const cls = classnames.bind(styles$9)({
|
|
25214
25359
|
itemTitle: "itemTitle",
|
|
25215
25360
|
"drop-over-upward": isOver && index2 < sourceItem.index,
|
|
25216
25361
|
"drop-over-downward": isOver && index2 > sourceItem.index
|
|
@@ -25223,7 +25368,7 @@ const TitleRender$1 = (props) => {
|
|
|
25223
25368
|
}, customRender && customRender({ data, index: index2, onChange, moduleDataSource }), /* @__PURE__ */ React$1.createElement(Icon, {
|
|
25224
25369
|
type: "close",
|
|
25225
25370
|
size: "small",
|
|
25226
|
-
className: styles$
|
|
25371
|
+
className: styles$9.itemClose,
|
|
25227
25372
|
onClick: onRemove
|
|
25228
25373
|
}));
|
|
25229
25374
|
};
|
|
@@ -25260,9 +25405,9 @@ function MddTableSimpleArray(props) {
|
|
|
25260
25405
|
onChange({ record, index: index2, data });
|
|
25261
25406
|
};
|
|
25262
25407
|
return /* @__PURE__ */ React$1.createElement("div", {
|
|
25263
|
-
className: styles$
|
|
25408
|
+
className: styles$9.mddTableArray
|
|
25264
25409
|
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
25265
|
-
className: styles$
|
|
25410
|
+
className: styles$9.tableArrayTitle
|
|
25266
25411
|
}, title2, tip && /* @__PURE__ */ React$1.createElement(Balloon, {
|
|
25267
25412
|
trigger: /* @__PURE__ */ React$1.createElement(Icon, {
|
|
25268
25413
|
type: "help",
|
|
@@ -25270,7 +25415,7 @@ function MddTableSimpleArray(props) {
|
|
|
25270
25415
|
}),
|
|
25271
25416
|
align: "t"
|
|
25272
25417
|
}, tip)), /* @__PURE__ */ React$1.createElement("div", {
|
|
25273
|
-
className: styles$
|
|
25418
|
+
className: styles$9.tableArrayContent
|
|
25274
25419
|
}, /* @__PURE__ */ React$1.createElement(DndProvider, {
|
|
25275
25420
|
backend: HTML5Backend
|
|
25276
25421
|
}, /* @__PURE__ */ React$1.createElement(Collapse, {
|
|
@@ -25289,28 +25434,28 @@ function MddTableSimpleArray(props) {
|
|
|
25289
25434
|
customRender: titleRender
|
|
25290
25435
|
})
|
|
25291
25436
|
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
25292
|
-
className: styles$
|
|
25437
|
+
className: styles$9.collapseContent
|
|
25293
25438
|
}, contentRender2({ data: item, index: idx, onChange: onTableArrayChange })));
|
|
25294
25439
|
})))), /* @__PURE__ */ React$1.createElement("div", {
|
|
25295
|
-
className: styles$
|
|
25440
|
+
className: styles$9.tableArrayBottom
|
|
25296
25441
|
}, /* @__PURE__ */ React$1.createElement(Button, {
|
|
25297
25442
|
onClick: onAdd,
|
|
25298
25443
|
style: { padding: "0 48px" }
|
|
25299
25444
|
}, "\u6DFB\u52A0\u9879")));
|
|
25300
25445
|
}
|
|
25301
|
-
const customTabItem$
|
|
25302
|
-
const tabTitle$
|
|
25303
|
-
const tabLabel$
|
|
25304
|
-
const middleBox = "_middleBox_119xt_20";
|
|
25305
|
-
const middleBoxLeft = "_middleBoxLeft_119xt_26";
|
|
25306
|
-
const middleBoxRight = "_middleBoxRight_119xt_31";
|
|
25307
|
-
var styles$
|
|
25308
|
-
customTabItem: customTabItem$
|
|
25309
|
-
tabTitle: tabTitle$
|
|
25310
|
-
tabLabel: tabLabel$
|
|
25311
|
-
middleBox,
|
|
25312
|
-
middleBoxLeft,
|
|
25313
|
-
middleBoxRight
|
|
25446
|
+
const customTabItem$5 = "_customTabItem_119xt_1";
|
|
25447
|
+
const tabTitle$5 = "_tabTitle_119xt_5";
|
|
25448
|
+
const tabLabel$5 = "_tabLabel_119xt_9";
|
|
25449
|
+
const middleBox$1 = "_middleBox_119xt_20";
|
|
25450
|
+
const middleBoxLeft$1 = "_middleBoxLeft_119xt_26";
|
|
25451
|
+
const middleBoxRight$1 = "_middleBoxRight_119xt_31";
|
|
25452
|
+
var styles$8 = {
|
|
25453
|
+
customTabItem: customTabItem$5,
|
|
25454
|
+
tabTitle: tabTitle$5,
|
|
25455
|
+
tabLabel: tabLabel$5,
|
|
25456
|
+
middleBox: middleBox$1,
|
|
25457
|
+
middleBoxLeft: middleBoxLeft$1,
|
|
25458
|
+
middleBoxRight: middleBoxRight$1
|
|
25314
25459
|
};
|
|
25315
25460
|
const Middle_Module_Opts = [
|
|
25316
25461
|
{
|
|
@@ -25365,47 +25510,47 @@ function contentRender$1(props) {
|
|
|
25365
25510
|
};
|
|
25366
25511
|
const moduleValue = schema.get("value");
|
|
25367
25512
|
return /* @__PURE__ */ React$1.createElement("div", null, /* @__PURE__ */ React$1.createElement("div", {
|
|
25368
|
-
className: styles$
|
|
25513
|
+
className: styles$8.middleBox
|
|
25369
25514
|
}, /* @__PURE__ */ React$1.createElement("label", {
|
|
25370
|
-
className: styles$
|
|
25515
|
+
className: styles$8.middleBoxLeft
|
|
25371
25516
|
}, "\u6E32\u67D3\u6A21\u5757\uFF1A"), /* @__PURE__ */ React$1.createElement(Select$2.AutoComplete, {
|
|
25372
25517
|
dataSource: Middle_Module_Opts,
|
|
25373
25518
|
size: "small",
|
|
25374
|
-
className: styles$
|
|
25519
|
+
className: styles$8.middleBoxRight,
|
|
25375
25520
|
value: moduleValue,
|
|
25376
25521
|
onChange: (val) => onBaseInfoChange("value", val)
|
|
25377
25522
|
})), /* @__PURE__ */ React$1.createElement("div", {
|
|
25378
|
-
className: styles$
|
|
25523
|
+
className: styles$8.middleBox
|
|
25379
25524
|
}, /* @__PURE__ */ React$1.createElement("label", {
|
|
25380
|
-
className: styles$
|
|
25525
|
+
className: styles$8.middleBoxLeft
|
|
25381
25526
|
}, "\u6A21\u5757\u53C2\u6570\uFF1A"), /* @__PURE__ */ React$1.createElement(TableFormProxy, {
|
|
25382
|
-
className: styles$
|
|
25527
|
+
className: styles$8.middleBoxRight,
|
|
25383
25528
|
value: schema.get("params"),
|
|
25384
25529
|
onChange: (v2) => onBaseInfoChange("params", v2)
|
|
25385
25530
|
})), moduleValue === "ftp-tabs" && /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement("div", {
|
|
25386
|
-
className: styles$
|
|
25531
|
+
className: styles$8.middleBox
|
|
25387
25532
|
}, /* @__PURE__ */ React$1.createElement("label", {
|
|
25388
|
-
className: styles$
|
|
25533
|
+
className: styles$8.middleBoxLeft
|
|
25389
25534
|
}, "\u63A5\u53E3\u8BF7\u6C42KEY\uFF1A"), /* @__PURE__ */ React$1.createElement(Input$1, {
|
|
25390
|
-
className: styles$
|
|
25535
|
+
className: styles$8.middleBoxRight,
|
|
25391
25536
|
value: schema.get("dataIndex"),
|
|
25392
25537
|
size: "small",
|
|
25393
25538
|
onChange: (v2) => onBaseInfoChange("dataIndex", v2)
|
|
25394
25539
|
})), /* @__PURE__ */ React$1.createElement("div", {
|
|
25395
|
-
className: styles$
|
|
25540
|
+
className: styles$8.middleBox
|
|
25396
25541
|
}, /* @__PURE__ */ React$1.createElement("label", {
|
|
25397
|
-
className: styles$
|
|
25542
|
+
className: styles$8.middleBoxLeft
|
|
25398
25543
|
}, "\u9ED8\u8BA4\u503C\uFF1A"), /* @__PURE__ */ React$1.createElement(DynamicValueBase, {
|
|
25399
|
-
className: styles$
|
|
25544
|
+
className: styles$8.middleBoxRight,
|
|
25400
25545
|
value: schema.get("defaultTabValue"),
|
|
25401
25546
|
size: "small",
|
|
25402
25547
|
onChange: (v2) => onBaseInfoChange("defaultTabValue", v2)
|
|
25403
25548
|
})), /* @__PURE__ */ React$1.createElement("div", {
|
|
25404
|
-
className: styles$
|
|
25549
|
+
className: styles$8.middleBox
|
|
25405
25550
|
}, /* @__PURE__ */ React$1.createElement("label", {
|
|
25406
|
-
className: styles$
|
|
25551
|
+
className: styles$8.middleBoxLeft
|
|
25407
25552
|
}, "\u591A\u6807\u7B7E\u6570\u636E\u6E90\uFF1A"), /* @__PURE__ */ React$1.createElement("div", {
|
|
25408
|
-
className: styles$
|
|
25553
|
+
className: styles$8.middleBoxRight
|
|
25409
25554
|
}, /* @__PURE__ */ React$1.createElement(AjaxSchemaForm, {
|
|
25410
25555
|
schema: schema.getSourcePanel(),
|
|
25411
25556
|
isSelectType: false
|
|
@@ -25418,16 +25563,16 @@ function contentRender$1(props) {
|
|
|
25418
25563
|
href: "https://alidocs.dingtalk.com/i/nodes/dpYLaezmVNRMGX56C1ZxqyYdVrMqPxX6"
|
|
25419
25564
|
}, "\u6587\u6863"))))));
|
|
25420
25565
|
}
|
|
25421
|
-
const CustomTabItem$
|
|
25566
|
+
const CustomTabItem$5 = ({ title: title2, icon }) => {
|
|
25422
25567
|
return /* @__PURE__ */ React$1.createElement("div", {
|
|
25423
|
-
className: styles$
|
|
25568
|
+
className: styles$8.customTabItem
|
|
25424
25569
|
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
25425
|
-
className: styles$
|
|
25570
|
+
className: styles$8.tabTitle
|
|
25426
25571
|
}, /* @__PURE__ */ React$1.createElement(Icon, {
|
|
25427
25572
|
type: icon,
|
|
25428
25573
|
size: "small"
|
|
25429
25574
|
}), /* @__PURE__ */ React$1.createElement("span", {
|
|
25430
|
-
className: styles$
|
|
25575
|
+
className: styles$8.tabLabel
|
|
25431
25576
|
}, title2)));
|
|
25432
25577
|
};
|
|
25433
25578
|
function FtpBuild$1({ schema, moduleMap }) {
|
|
@@ -25442,7 +25587,7 @@ function FtpBuild$1({ schema, moduleMap }) {
|
|
|
25442
25587
|
shape: "wrapped",
|
|
25443
25588
|
tabPosition: "left",
|
|
25444
25589
|
className: "build-page-tab",
|
|
25445
|
-
tabRender: (key, props) => /* @__PURE__ */ React$1.createElement(CustomTabItem$
|
|
25590
|
+
tabRender: (key, props) => /* @__PURE__ */ React$1.createElement(CustomTabItem$5, {
|
|
25446
25591
|
key,
|
|
25447
25592
|
...props
|
|
25448
25593
|
})
|
|
@@ -25467,7 +25612,7 @@ function FtpBuild$1({ schema, moduleMap }) {
|
|
|
25467
25612
|
})), /* @__PURE__ */ React$1.createElement(Tab.Item, {
|
|
25468
25613
|
title: "\u5185\u5BB9\u533A",
|
|
25469
25614
|
icon: "detail"
|
|
25470
|
-
}, /* @__PURE__ */ React$1.createElement(TablePanel$
|
|
25615
|
+
}, /* @__PURE__ */ React$1.createElement(TablePanel$3, {
|
|
25471
25616
|
schema: schema.getTablePanel(),
|
|
25472
25617
|
swaggerFields: responseFields,
|
|
25473
25618
|
moduleMap
|
|
@@ -25484,6 +25629,106 @@ function FtpBuild$1({ schema, moduleMap }) {
|
|
|
25484
25629
|
isSelectType: false
|
|
25485
25630
|
}))));
|
|
25486
25631
|
}
|
|
25632
|
+
function TablePanel$2({ schema, swaggerFields = [] }) {
|
|
25633
|
+
const columnMddFormRef = React$1.useRef();
|
|
25634
|
+
const [_2, forceUpdate] = useState({});
|
|
25635
|
+
useEffect(() => {
|
|
25636
|
+
schema.on("$updated", (changeData, ignoreUpdate) => {
|
|
25637
|
+
!ignoreUpdate && forceUpdate({});
|
|
25638
|
+
});
|
|
25639
|
+
hackRowDetail(schema);
|
|
25640
|
+
}, []);
|
|
25641
|
+
const columns = schema.get("columns");
|
|
25642
|
+
const onAddHandle = (key) => {
|
|
25643
|
+
var _a2;
|
|
25644
|
+
switch (key) {
|
|
25645
|
+
case "columns":
|
|
25646
|
+
schema.add(
|
|
25647
|
+
{
|
|
25648
|
+
type: "text",
|
|
25649
|
+
label: "\u5C55\u793A\u9879",
|
|
25650
|
+
name: ""
|
|
25651
|
+
},
|
|
25652
|
+
"columns",
|
|
25653
|
+
true
|
|
25654
|
+
);
|
|
25655
|
+
(_a2 = columnMddFormRef.current) == null ? void 0 : _a2.updateData(schema.get("columns"));
|
|
25656
|
+
break;
|
|
25657
|
+
}
|
|
25658
|
+
};
|
|
25659
|
+
const onRemoveHandle = (index2, key) => {
|
|
25660
|
+
var _a2;
|
|
25661
|
+
schema.remove(index2, key, true);
|
|
25662
|
+
if (key === "columns") {
|
|
25663
|
+
(_a2 = columnMddFormRef.current) == null ? void 0 : _a2.updateData(schema.get("columns"));
|
|
25664
|
+
}
|
|
25665
|
+
};
|
|
25666
|
+
const onChangeHandle = ({ index: index2, record }, key) => {
|
|
25667
|
+
schema.update(index2, record, key, true);
|
|
25668
|
+
};
|
|
25669
|
+
return /* @__PURE__ */ React$1.createElement("div", null, /* @__PURE__ */ React$1.createElement(MddTableForm$1, {
|
|
25670
|
+
ref: columnMddFormRef,
|
|
25671
|
+
data: columns,
|
|
25672
|
+
title: "\u914D\u7F6E\u8868\u683C\u5217",
|
|
25673
|
+
componentOptions: columnsTypeOptionsWithCnTable.filter((col) => col.value !== "blocks-table"),
|
|
25674
|
+
onAdd: () => onAddHandle("columns"),
|
|
25675
|
+
onRemove: (index2) => onRemoveHandle(index2, "columns"),
|
|
25676
|
+
onChange: ({ index: index2, record }) => onChangeHandle({ index: index2, record }, "columns"),
|
|
25677
|
+
onSort: (newList) => {
|
|
25678
|
+
schema.setItemAll(newList, "columns", true);
|
|
25679
|
+
}
|
|
25680
|
+
}));
|
|
25681
|
+
}
|
|
25682
|
+
function hackRowDetail(schema) {
|
|
25683
|
+
const rowDetail = schema.get("rowDetail");
|
|
25684
|
+
if (rowDetail) {
|
|
25685
|
+
schema.set("rowDetail", void 0);
|
|
25686
|
+
}
|
|
25687
|
+
}
|
|
25688
|
+
const customTabItem$4 = "_customTabItem_119xt_1";
|
|
25689
|
+
const tabTitle$4 = "_tabTitle_119xt_5";
|
|
25690
|
+
const tabLabel$4 = "_tabLabel_119xt_9";
|
|
25691
|
+
const middleBox = "_middleBox_119xt_20";
|
|
25692
|
+
const middleBoxLeft = "_middleBoxLeft_119xt_26";
|
|
25693
|
+
const middleBoxRight = "_middleBoxRight_119xt_31";
|
|
25694
|
+
var styles$7 = {
|
|
25695
|
+
customTabItem: customTabItem$4,
|
|
25696
|
+
tabTitle: tabTitle$4,
|
|
25697
|
+
tabLabel: tabLabel$4,
|
|
25698
|
+
middleBox,
|
|
25699
|
+
middleBoxLeft,
|
|
25700
|
+
middleBoxRight
|
|
25701
|
+
};
|
|
25702
|
+
const CustomTabItem$4 = ({ title: title2, icon }) => {
|
|
25703
|
+
return /* @__PURE__ */ React$1.createElement("div", {
|
|
25704
|
+
className: styles$7.customTabItem
|
|
25705
|
+
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
25706
|
+
className: styles$7.tabTitle
|
|
25707
|
+
}, /* @__PURE__ */ React$1.createElement(Icon, {
|
|
25708
|
+
type: icon,
|
|
25709
|
+
size: "small"
|
|
25710
|
+
}), /* @__PURE__ */ React$1.createElement("span", {
|
|
25711
|
+
className: styles$7.tabLabel
|
|
25712
|
+
}, title2)));
|
|
25713
|
+
};
|
|
25714
|
+
function BlocksBuild({ schema, moduleMap }) {
|
|
25715
|
+
return /* @__PURE__ */ React$1.createElement(Tab, {
|
|
25716
|
+
animation: false,
|
|
25717
|
+
lazyLoad: false,
|
|
25718
|
+
shape: "wrapped",
|
|
25719
|
+
tabPosition: "left",
|
|
25720
|
+
className: "build-page-tab",
|
|
25721
|
+
tabRender: (key, props) => /* @__PURE__ */ React$1.createElement(CustomTabItem$4, {
|
|
25722
|
+
key,
|
|
25723
|
+
...props
|
|
25724
|
+
})
|
|
25725
|
+
}, /* @__PURE__ */ React$1.createElement(Tab.Item, {
|
|
25726
|
+
title: "\u5185\u5BB9\u533A",
|
|
25727
|
+
icon: "detail"
|
|
25728
|
+
}, /* @__PURE__ */ React$1.createElement(TablePanel$2, {
|
|
25729
|
+
schema: schema.getTablePanel()
|
|
25730
|
+
})));
|
|
25731
|
+
}
|
|
25487
25732
|
const mddTableArray = "_mddTableArray_16ght_1";
|
|
25488
25733
|
const tableArrayTitle = "_tableArrayTitle_16ght_14";
|
|
25489
25734
|
const tableArrayContent = "_tableArrayContent_16ght_18";
|
|
@@ -27297,6 +27542,7 @@ function MDDEditor(props) {
|
|
|
27297
27542
|
customSchema,
|
|
27298
27543
|
moduleDataSource,
|
|
27299
27544
|
refreshModuleDataSource,
|
|
27545
|
+
blocksDataSource,
|
|
27300
27546
|
moduleMap = /* @__PURE__ */ new Map(),
|
|
27301
27547
|
scriptTopButtons = []
|
|
27302
27548
|
} = props;
|
|
@@ -27307,7 +27553,8 @@ function MDDEditor(props) {
|
|
|
27307
27553
|
React$1.useEffect(() => {
|
|
27308
27554
|
setModules({
|
|
27309
27555
|
$ModuleDataSource: moduleDataSource,
|
|
27310
|
-
$RefreshModuleDataSource: refreshModuleDataSource
|
|
27556
|
+
$RefreshModuleDataSource: refreshModuleDataSource,
|
|
27557
|
+
$BlocksDataSource: blocksDataSource
|
|
27311
27558
|
});
|
|
27312
27559
|
console.log("moduleDataSource: ", moduleDataSource);
|
|
27313
27560
|
window.__MDD_ModuleDataSource = moduleDataSource;
|
|
@@ -27418,6 +27665,9 @@ function getCompAndSchemaFromSchemaJson(schemaJson, customComponent, customSchem
|
|
|
27418
27665
|
case "edit-table": {
|
|
27419
27666
|
return [customComponent || FtpBuild, customSchema || FtpSchema];
|
|
27420
27667
|
}
|
|
27668
|
+
case "blocks-table": {
|
|
27669
|
+
return [customComponent || BlocksBuild, customSchema || BlocksSchema];
|
|
27670
|
+
}
|
|
27421
27671
|
default:
|
|
27422
27672
|
return null;
|
|
27423
27673
|
}
|