@cniot/mdd-editor 0.2.0-beta.7 → 0.2.0-beta.9

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/build/index.es.js CHANGED
@@ -1430,7 +1430,7 @@ function object2Array(obj, pre = "") {
1430
1430
  };
1431
1431
  }).flat(Infinity);
1432
1432
  }
1433
- class TableSchema$1 extends JSONWatch {
1433
+ class TableSchema$2 extends JSONWatch {
1434
1434
  constructor(props) {
1435
1435
  const {
1436
1436
  columns = [],
@@ -1558,132 +1558,103 @@ class HeaderToolbar$1 extends JSONWatch {
1558
1558
  return this.data || [];
1559
1559
  }
1560
1560
  }
1561
- var js_cookie = { exports: {} };
1562
- /*!
1563
- * JavaScript Cookie v2.2.1
1564
- * https://github.com/js-cookie/js-cookie
1565
- *
1566
- * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
1567
- * Released under the MIT license
1568
- */
1569
- (function(module, exports) {
1570
- (function(factory) {
1571
- var registeredInModuleLoader;
1572
- {
1573
- module.exports = factory();
1574
- registeredInModuleLoader = true;
1575
- }
1576
- if (!registeredInModuleLoader) {
1577
- var OldCookies = window.Cookies;
1578
- var api = window.Cookies = factory();
1579
- api.noConflict = function() {
1580
- window.Cookies = OldCookies;
1581
- return api;
1582
- };
1561
+ /*! js-cookie v3.0.5 | MIT */
1562
+ function assign(target) {
1563
+ for (var i = 1; i < arguments.length; i++) {
1564
+ var source = arguments[i];
1565
+ for (var key in source) {
1566
+ target[key] = source[key];
1583
1567
  }
1584
- })(function() {
1585
- function extend() {
1586
- var i = 0;
1587
- var result = {};
1588
- for (; i < arguments.length; i++) {
1589
- var attributes = arguments[i];
1590
- for (var key in attributes) {
1591
- result[key] = attributes[key];
1592
- }
1593
- }
1594
- return result;
1568
+ }
1569
+ return target;
1570
+ }
1571
+ var defaultConverter = {
1572
+ read: function(value) {
1573
+ if (value[0] === '"') {
1574
+ value = value.slice(1, -1);
1575
+ }
1576
+ return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
1577
+ },
1578
+ write: function(value) {
1579
+ return encodeURIComponent(value).replace(
1580
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
1581
+ decodeURIComponent
1582
+ );
1583
+ }
1584
+ };
1585
+ function init$1(converter, defaultAttributes) {
1586
+ function set(name, value, attributes) {
1587
+ if (typeof document === "undefined") {
1588
+ return;
1589
+ }
1590
+ attributes = assign({}, defaultAttributes, attributes);
1591
+ if (typeof attributes.expires === "number") {
1592
+ attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
1595
1593
  }
1596
- function decode(s) {
1597
- return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
1594
+ if (attributes.expires) {
1595
+ attributes.expires = attributes.expires.toUTCString();
1598
1596
  }
1599
- function init2(converter) {
1600
- function api() {
1597
+ name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
1598
+ var stringifiedAttributes = "";
1599
+ for (var attributeName in attributes) {
1600
+ if (!attributes[attributeName]) {
1601
+ continue;
1601
1602
  }
1602
- function set(key, value, attributes) {
1603
- if (typeof document === "undefined") {
1604
- return;
1605
- }
1606
- attributes = extend({
1607
- path: "/"
1608
- }, api.defaults, attributes);
1609
- if (typeof attributes.expires === "number") {
1610
- attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e5);
1611
- }
1612
- attributes.expires = attributes.expires ? attributes.expires.toUTCString() : "";
1613
- try {
1614
- var result = JSON.stringify(value);
1615
- if (/^[\{\[]/.test(result)) {
1616
- value = result;
1617
- }
1618
- } catch (e) {
1619
- }
1620
- value = converter.write ? converter.write(value, key) : encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
1621
- key = encodeURIComponent(String(key)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\(\)]/g, escape);
1622
- var stringifiedAttributes = "";
1623
- for (var attributeName in attributes) {
1624
- if (!attributes[attributeName]) {
1625
- continue;
1626
- }
1627
- stringifiedAttributes += "; " + attributeName;
1628
- if (attributes[attributeName] === true) {
1629
- continue;
1630
- }
1631
- stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
1632
- }
1633
- return document.cookie = key + "=" + value + stringifiedAttributes;
1603
+ stringifiedAttributes += "; " + attributeName;
1604
+ if (attributes[attributeName] === true) {
1605
+ continue;
1634
1606
  }
1635
- function get2(key, json) {
1636
- if (typeof document === "undefined") {
1637
- return;
1638
- }
1639
- var jar = {};
1640
- var cookies = document.cookie ? document.cookie.split("; ") : [];
1641
- var i = 0;
1642
- for (; i < cookies.length; i++) {
1643
- var parts = cookies[i].split("=");
1644
- var cookie = parts.slice(1).join("=");
1645
- if (!json && cookie.charAt(0) === '"') {
1646
- cookie = cookie.slice(1, -1);
1647
- }
1648
- try {
1649
- var name = decode(parts[0]);
1650
- cookie = (converter.read || converter)(cookie, name) || decode(cookie);
1651
- if (json) {
1652
- try {
1653
- cookie = JSON.parse(cookie);
1654
- } catch (e) {
1655
- }
1656
- }
1657
- jar[name] = cookie;
1658
- if (key === name) {
1659
- break;
1660
- }
1661
- } catch (e) {
1662
- }
1607
+ stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
1608
+ }
1609
+ return document.cookie = name + "=" + converter.write(value, name) + stringifiedAttributes;
1610
+ }
1611
+ function get2(name) {
1612
+ if (typeof document === "undefined" || arguments.length && !name) {
1613
+ return;
1614
+ }
1615
+ var cookies = document.cookie ? document.cookie.split("; ") : [];
1616
+ var jar = {};
1617
+ for (var i = 0; i < cookies.length; i++) {
1618
+ var parts = cookies[i].split("=");
1619
+ var value = parts.slice(1).join("=");
1620
+ try {
1621
+ var found = decodeURIComponent(parts[0]);
1622
+ jar[found] = converter.read(value, found);
1623
+ if (name === found) {
1624
+ break;
1663
1625
  }
1664
- return key ? jar[key] : jar;
1626
+ } catch (e) {
1665
1627
  }
1666
- api.set = set;
1667
- api.get = function(key) {
1668
- return get2(key, false);
1669
- };
1670
- api.getJSON = function(key) {
1671
- return get2(key, true);
1672
- };
1673
- api.remove = function(key, attributes) {
1674
- set(key, "", extend(attributes, {
1675
- expires: -1
1676
- }));
1677
- };
1678
- api.defaults = {};
1679
- api.withConverter = init2;
1680
- return api;
1681
1628
  }
1682
- return init2(function() {
1683
- });
1684
- });
1685
- })(js_cookie);
1686
- var Cookies = js_cookie.exports;
1629
+ return name ? jar[name] : jar;
1630
+ }
1631
+ return Object.create(
1632
+ {
1633
+ set,
1634
+ get: get2,
1635
+ remove: function(name, attributes) {
1636
+ set(
1637
+ name,
1638
+ "",
1639
+ assign({}, attributes, {
1640
+ expires: -1
1641
+ })
1642
+ );
1643
+ },
1644
+ withAttributes: function(attributes) {
1645
+ return init$1(this.converter, assign({}, this.attributes, attributes));
1646
+ },
1647
+ withConverter: function(converter2) {
1648
+ return init$1(assign({}, this.converter, converter2), this.attributes);
1649
+ }
1650
+ },
1651
+ {
1652
+ attributes: { value: Object.freeze(defaultAttributes) },
1653
+ converter: { value: Object.freeze(converter) }
1654
+ }
1655
+ );
1656
+ }
1657
+ var api = init$1(defaultConverter, { path: "/" });
1687
1658
  const calcWordWidth = (str) => {
1688
1659
  const Min_Width = 50;
1689
1660
  if (!str || typeof str !== "string")
@@ -1703,7 +1674,7 @@ const upperFirst$1 = (str) => {
1703
1674
  return str.slice(0, 1).toUpperCase() + temp;
1704
1675
  };
1705
1676
  const getGlobalSizeFromCookie = () => {
1706
- return Cookies == null ? void 0 : Cookies.get("CNUICOOKIESIZE");
1677
+ return api == null ? void 0 : api.get("CNUICOOKIESIZE");
1707
1678
  };
1708
1679
  const getDefaultFomrLabelAlign = () => {
1709
1680
  const globalSize = getGlobalSizeFromCookie();
@@ -2000,29 +1971,29 @@ const openApi3Support = (apiInfo) => {
2000
1971
  responses: res
2001
1972
  };
2002
1973
  };
2003
- var buildSwaggerApiJson = (api, apiMeta) => {
2004
- if (!api || !apiMeta) {
1974
+ var buildSwaggerApiJson = (api2, apiMeta) => {
1975
+ if (!api2 || !apiMeta) {
2005
1976
  throw Error("mdd-tool columns complier error: api or api meta is null");
2006
1977
  }
2007
1978
  const { paths, definitions } = apiMeta || {};
2008
- if (!paths[api]) {
2009
- throw Error(`mdd-tool columns complier error: api meta has not api: ${api}`);
1979
+ if (!paths[api2]) {
1980
+ throw Error(`mdd-tool columns complier error: api meta has not api: ${api2}`);
2010
1981
  }
2011
1982
  let method = "";
2012
1983
  let apiInfo = null;
2013
- if (Object.prototype.hasOwnProperty.call(paths[api], "post")) {
1984
+ if (Object.prototype.hasOwnProperty.call(paths[api2], "post")) {
2014
1985
  method = "post";
2015
- apiInfo = paths[api]["post"];
2016
- } else if (Object.prototype.hasOwnProperty.call(paths[api], "get")) {
1986
+ apiInfo = paths[api2]["post"];
1987
+ } else if (Object.prototype.hasOwnProperty.call(paths[api2], "get")) {
2017
1988
  method = "get";
2018
- apiInfo = paths[api]["get"];
1989
+ apiInfo = paths[api2]["get"];
2019
1990
  } else {
2020
1991
  throw Error("mdd-tool columns complier error: api method not support");
2021
1992
  }
2022
1993
  const { summary } = apiInfo;
2023
1994
  const { parameters = [], responses } = openApi3Support(apiInfo);
2024
1995
  return {
2025
- api,
1996
+ api: api2,
2026
1997
  method,
2027
1998
  summary,
2028
1999
  parameters: transfer$refToJson("parameters", parameters, definitions),
@@ -2461,11 +2432,11 @@ function handleDefinitions(obj, map, depth) {
2461
2432
  function getSwaggerInfoFromJson(swaggerJson) {
2462
2433
  return jsonSchemaRefParser(transferOpenAPI3ToSwagger2$1(swaggerJson));
2463
2434
  }
2464
- function getApiInfo(api, swaggerInfo) {
2435
+ function getApiInfo(api2, swaggerInfo) {
2465
2436
  const realSwaggerInfo = jsonSchemaRefParser(transferOpenAPI3ToSwagger2$1(swaggerInfo));
2466
- return buildSwaggerApiJson(api, realSwaggerInfo);
2437
+ return buildSwaggerApiJson(api2, realSwaggerInfo);
2467
2438
  }
2468
- function api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSchema = {}) {
2439
+ function api2SchemaFromSwaggerApiInfo(api2, schemaType, apiInfo, extraSchema = {}) {
2469
2440
  const { parameters = [], responses = [], method = "" } = apiInfo || {};
2470
2441
  const methodUpperCase = method.toUpperCase();
2471
2442
  const result = {
@@ -2488,8 +2459,8 @@ function api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSchema = {}
2488
2459
  tableColumns: "$RET.data.tableColumns",
2489
2460
  totalCount: "$RET.data.paging.totalCount"
2490
2461
  },
2491
- value: api,
2492
- url: api
2462
+ value: api2,
2463
+ url: api2
2493
2464
  },
2494
2465
  filter: {
2495
2466
  maxVisibleRow: 2,
@@ -2534,8 +2505,8 @@ function api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSchema = {}
2534
2505
  watch: [],
2535
2506
  params: {},
2536
2507
  formatResponseData: {},
2537
- value: api,
2538
- url: api
2508
+ value: api2,
2509
+ url: api2
2539
2510
  },
2540
2511
  initApi: [],
2541
2512
  effectApi: [],
@@ -2574,7 +2545,7 @@ function api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSchema = {}
2574
2545
  label: "\u57FA\u7840\u4FE1\u606F",
2575
2546
  source: [
2576
2547
  {
2577
- url: api,
2548
+ url: api2,
2578
2549
  method: methodUpperCase,
2579
2550
  type: "ajax",
2580
2551
  formatResponseData: {
@@ -2607,8 +2578,8 @@ function api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSchema = {}
2607
2578
  formatResponseData: {
2608
2579
  tableData: "$RET.data.tableData"
2609
2580
  },
2610
- value: api,
2611
- url: api
2581
+ value: api2,
2582
+ url: api2
2612
2583
  },
2613
2584
  submitApi: {
2614
2585
  type: "ajax",
@@ -2637,12 +2608,18 @@ function api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSchema = {}
2637
2608
  },
2638
2609
  headerToolbar: []
2639
2610
  };
2611
+ } else if (schemaType === "blocks-table") {
2612
+ result.type = "blocks";
2613
+ result.body = {
2614
+ type: "blocks-table",
2615
+ blocks: []
2616
+ };
2640
2617
  }
2641
2618
  return merge_1(result, extraSchema);
2642
2619
  }
2643
- function api2SchemaFromSwagger(api, schemaType, swaggerInfo, extraSchema = {}) {
2644
- const apiInfo = getApiInfo(api, swaggerInfo);
2645
- return api2SchemaFromSwaggerApiInfo(api, schemaType, apiInfo, extraSchema);
2620
+ function api2SchemaFromSwagger(api2, schemaType, swaggerInfo, extraSchema = {}) {
2621
+ const apiInfo = getApiInfo(api2, swaggerInfo);
2622
+ return api2SchemaFromSwaggerApiInfo(api2, schemaType, apiInfo, extraSchema);
2646
2623
  }
2647
2624
  function transferOpenAPI3ToSwagger2$1(data) {
2648
2625
  if (data && data.components && data.components.schemas) {
@@ -2778,13 +2755,13 @@ class MiddleItem extends JSONWatch {
2778
2755
  }
2779
2756
  class FtpSchema$1 extends Schema {
2780
2757
  constructor(props, isCompleteSchema = false) {
2781
- const { api, filter, headerToolbar, table, tabs, middleModules, ...more2 } = isCompleteSchema ? props.body : props;
2758
+ const { api: api2, filter, headerToolbar, table, tabs, middleModules, ...more2 } = isCompleteSchema ? props.body : props;
2782
2759
  super(more2);
2783
2760
  this.type = "ftp";
2784
- this.api = new AjaxSchema(api);
2761
+ this.api = new AjaxSchema(api2);
2785
2762
  this.filter = new Filter(filter);
2786
2763
  this.headerToolbar = new HeaderToolbar$1(headerToolbar);
2787
- this.table = new TableSchema$1(table);
2764
+ this.table = new TableSchema$2(table);
2788
2765
  this.initChildren(middleModules, tabs);
2789
2766
  this.willDetach = this.initChangeListener();
2790
2767
  }
@@ -2855,12 +2832,12 @@ class FtpSchema$1 extends Schema {
2855
2832
  }
2856
2833
  initFromCache(schema) {
2857
2834
  const { body, ...more2 } = schema;
2858
- const { api, filter, headerToolbar, table, tabs, middleModules } = body;
2835
+ const { api: api2, filter, headerToolbar, table, tabs, middleModules } = body;
2859
2836
  if (this.willDetach) {
2860
2837
  this.willDetach();
2861
2838
  }
2862
2839
  this.init(more2);
2863
- this.api.updateAll(api);
2840
+ this.api.updateAll(api2);
2864
2841
  this.filter.updateAll(filter);
2865
2842
  this.headerToolbar.updateAll(headerToolbar);
2866
2843
  this.table.updateAll(this.compatTableHandle(table));
@@ -2951,7 +2928,93 @@ class FtpSchema$1 extends Schema {
2951
2928
  }
2952
2929
  __publicField(FtpSchema$1, "Filter", Filter);
2953
2930
  __publicField(FtpSchema$1, "HeaderToolbar", HeaderToolbar$1);
2954
- __publicField(FtpSchema$1, "Table", TableSchema$1);
2931
+ __publicField(FtpSchema$1, "Table", TableSchema$2);
2932
+ class TableSchema$1 extends JSONWatch {
2933
+ constructor(props) {
2934
+ super({
2935
+ columns: props
2936
+ });
2937
+ }
2938
+ setFieldsAll(columns, ignoreUpdate = false) {
2939
+ this.set("columns", columns, ignoreUpdate);
2940
+ }
2941
+ setItemAll(value, type = "columns", ignoreUpdate = false) {
2942
+ this.set(type, value, ignoreUpdate);
2943
+ }
2944
+ add(field, key = "columns", ignoreUpdate = false) {
2945
+ this.data[key].push(field);
2946
+ this.emit("$updated", null, ignoreUpdate);
2947
+ }
2948
+ remove(index2, key = "columns", ignoreUpdate = false) {
2949
+ this.data[key].splice(index2, 1);
2950
+ this.emit("$updated", null, ignoreUpdate);
2951
+ }
2952
+ update(index2, data, key = "columns", ignoreUpdate = false) {
2953
+ if (["columns", "actionColumns", "bulkActions"].includes(key)) {
2954
+ this.data[key].splice(index2, 1, data);
2955
+ } else {
2956
+ this.data[key] = data;
2957
+ }
2958
+ this.emit("$updated", null, ignoreUpdate);
2959
+ }
2960
+ updateAll(data) {
2961
+ this.data = data;
2962
+ this.emit("$updated");
2963
+ }
2964
+ delete() {
2965
+ }
2966
+ getJSON() {
2967
+ return super.getJSON();
2968
+ }
2969
+ }
2970
+ class BlocksSchema extends Schema {
2971
+ constructor(props, isCompleteSchema = false) {
2972
+ const { type, blocks, ...more2 } = isCompleteSchema ? props.body : props;
2973
+ super(more2);
2974
+ this.type = type;
2975
+ this.blocks = new TableSchema$1(blocks);
2976
+ this.willDetach = this.initChangeListener();
2977
+ }
2978
+ initChangeListener() {
2979
+ const fun = () => {
2980
+ super.emit(EVENT_KEY.SCHEMA_UPDATE, { schemaJson: this.getAllJSON(), schema: this });
2981
+ };
2982
+ this.blocks.on("$updated", fun);
2983
+ return () => {
2984
+ this.blocks.off("$updated", fun);
2985
+ };
2986
+ }
2987
+ initFromCache(schema) {
2988
+ const { body, ...more2 } = schema;
2989
+ const { blocks } = body;
2990
+ if (this.willDetach) {
2991
+ this.willDetach();
2992
+ }
2993
+ this.init(more2);
2994
+ this.blocks.updateAll(blocks);
2995
+ this.willDetach = this.initChangeListener();
2996
+ }
2997
+ getSchemaType() {
2998
+ return this.type;
2999
+ }
3000
+ getTablePanel() {
3001
+ return this.blocks;
3002
+ }
3003
+ getAllJSON() {
3004
+ const res = super.getAllJSON();
3005
+ return { ...res, type: "blocks" };
3006
+ }
3007
+ toJSON() {
3008
+ return {
3009
+ type: this.type,
3010
+ blocks: this.blocks.getJSON().columns
3011
+ };
3012
+ }
3013
+ setBlocks(blocks) {
3014
+ this.blocks = blocks;
3015
+ }
3016
+ }
3017
+ __publicField(BlocksSchema, "Table", TableSchema$1);
2955
3018
  class FormInfo extends JSONWatch {
2956
3019
  constructor(props) {
2957
3020
  const {
@@ -3113,11 +3176,11 @@ function getWatchByRequest(params) {
3113
3176
  }
3114
3177
  class FormilyFormV2Schema extends Schema {
3115
3178
  constructor(props, isCompleteSchema = false) {
3116
- const { api, initApi, effectApi, baseInfo, fields: fields2, ...more2 } = isCompleteSchema ? props.body : props;
3179
+ const { api: api2, initApi, effectApi, baseInfo, fields: fields2, ...more2 } = isCompleteSchema ? props.body : props;
3117
3180
  super(more2);
3118
3181
  this.type = "formily-form-v2";
3119
3182
  this.baseInfo = new FormInfo(baseInfo);
3120
- this.api = new AjaxSchema(api);
3183
+ this.api = new AjaxSchema(api2);
3121
3184
  if (!initApi) {
3122
3185
  this.initApi = new AjaxSchemaQueue([]);
3123
3186
  } else {
@@ -3159,12 +3222,12 @@ class FormilyFormV2Schema extends Schema {
3159
3222
  }
3160
3223
  initFromCache(schema) {
3161
3224
  const { body, ...more2 } = schema;
3162
- const { api, initApi = [], effectApi = [], baseInfo, fields: fields2 } = body;
3225
+ const { api: api2, initApi = [], effectApi = [], baseInfo, fields: fields2 } = body;
3163
3226
  if (this.willDetach) {
3164
3227
  this.willDetach();
3165
3228
  }
3166
3229
  this.init(more2);
3167
- this.api.updateAll(api);
3230
+ this.api.updateAll(api2);
3168
3231
  if (!initApi) {
3169
3232
  this.initApi.updateAll([]);
3170
3233
  } else {
@@ -7723,7 +7786,7 @@ const dsTitleWatch$1 = "_dsTitleWatch_mxilv_32";
7723
7786
  const staticValueOkBtn$1 = "_staticValueOkBtn_mxilv_37";
7724
7787
  const tableDeleteBtn$1 = "_tableDeleteBtn_mxilv_41";
7725
7788
  const secondConfirm$1 = "_secondConfirm_mxilv_45";
7726
- var styles$d = {
7789
+ var styles$e = {
7727
7790
  dsType: dsType$1,
7728
7791
  dsJSONContent: dsJSONContent$1,
7729
7792
  dsJSONContentTip: dsJSONContentTip$1,
@@ -13094,23 +13157,23 @@ function useSwagger() {
13094
13157
  }
13095
13158
  };
13096
13159
  }
13097
- function createApiSelectItem(summary, api, method, request = []) {
13160
+ function createApiSelectItem(summary, api2, method, request = []) {
13098
13161
  return {
13099
13162
  summary,
13100
- label: `${summary} - ${method} ${api}`,
13101
- value: api,
13102
- url: api,
13163
+ label: `${summary} - ${method} ${api2}`,
13164
+ value: api2,
13165
+ url: api2,
13103
13166
  method,
13104
13167
  request,
13105
- parameters: api.parameters
13168
+ parameters: api2.parameters
13106
13169
  };
13107
13170
  }
13108
13171
  const getDataSourceArray$1 = (paths = {}) => {
13109
13172
  try {
13110
13173
  return Object.keys(paths).map((key) => {
13111
- const api = paths[key];
13112
- const apiPost = api.post || api.POST;
13113
- const apiGet = api.get || api.GET;
13174
+ const api2 = paths[key];
13175
+ const apiPost = api2.post || api2.POST;
13176
+ const apiGet = api2.get || api2.GET;
13114
13177
  if (apiPost) {
13115
13178
  return createApiSelectItem(apiPost.summary, key, "POST");
13116
13179
  } else if (apiGet) {
@@ -13183,8 +13246,8 @@ class PersistentStorage {
13183
13246
  }
13184
13247
  var storage = new PersistentStorage();
13185
13248
  class DataSourceSchema extends JSONWatch {
13186
- constructor(api) {
13187
- const { url, method = "get", ...more2 } = api || {};
13249
+ constructor(api2) {
13250
+ const { url, method = "get", ...more2 } = api2 || {};
13188
13251
  super({
13189
13252
  url,
13190
13253
  method,
@@ -13896,10 +13959,10 @@ function emitterVSCodeMessage(action, content2) {
13896
13959
  function emitSave(fileMapContent) {
13897
13960
  emitterVSCodeMessage(EMIT_EVENT_ACTION_SAVE, fileMapContent);
13898
13961
  }
13899
- const buildSchema = (schemaType, api, mainDataSource, moreProps) => {
13962
+ const buildSchema = (schemaType, api2, mainDataSource, moreProps) => {
13900
13963
  let schemaObj = null;
13901
13964
  if (schemaType === "ftp") {
13902
- schemaObj = new FtpSchema$1({ host: api, title: "" });
13965
+ schemaObj = new FtpSchema$1({ host: api2, title: "" });
13903
13966
  const realDataSource = {
13904
13967
  ...mainDataSource,
13905
13968
  type: "ajax",
@@ -13912,14 +13975,14 @@ const buildSchema = (schemaType, api, mainDataSource, moreProps) => {
13912
13975
  };
13913
13976
  schemaObj.getDataSourcePanel().update(realDataSource);
13914
13977
  } else if (schemaType === "formily-form") {
13915
- schemaObj = new FormilyFormSchema({ host: api, title: "" });
13978
+ schemaObj = new FormilyFormSchema({ host: api2, title: "" });
13916
13979
  const realDataSource = {
13917
13980
  ...mainDataSource,
13918
13981
  type: "ajax"
13919
13982
  };
13920
13983
  schemaObj.getDataSourcePanel().update(realDataSource);
13921
13984
  } else if (schemaType === "formily-form-v2") {
13922
- schemaObj = new FormilyFormV2Schema({ host: api, title: "" });
13985
+ schemaObj = new FormilyFormV2Schema({ host: api2, title: "" });
13923
13986
  const realDataSource = {
13924
13987
  ...mainDataSource,
13925
13988
  type: "ajax"
@@ -13927,7 +13990,7 @@ const buildSchema = (schemaType, api, mainDataSource, moreProps) => {
13927
13990
  schemaObj.getApiPanel().update(realDataSource);
13928
13991
  } else if (schemaType === "detail") {
13929
13992
  if (moreProps == null ? void 0 : moreProps.children) {
13930
- schemaObj = new DetailSchema({ host: api, title: "", ...moreProps });
13993
+ schemaObj = new DetailSchema({ host: api2, title: "", ...moreProps });
13931
13994
  } else {
13932
13995
  const realDataSource = {
13933
13996
  ...mainDataSource,
@@ -13936,10 +13999,10 @@ const buildSchema = (schemaType, api, mainDataSource, moreProps) => {
13936
13999
  detailData: "$RET.data"
13937
14000
  }
13938
14001
  };
13939
- schemaObj = new DetailSchema({ host: api, title: "", initDataSource: realDataSource });
14002
+ schemaObj = new DetailSchema({ host: api2, title: "", initDataSource: realDataSource });
13940
14003
  }
13941
14004
  } else if (schemaType === "edit-table") {
13942
- schemaObj = new FtpSchema({ host: api, title: "", ...moreProps });
14005
+ schemaObj = new FtpSchema({ host: api2, title: "", ...moreProps });
13943
14006
  const realDataSource = {
13944
14007
  ...mainDataSource,
13945
14008
  type: "ajax",
@@ -13966,8 +14029,8 @@ const buildSchema = (schemaType, api, mainDataSource, moreProps) => {
13966
14029
  }
13967
14030
  }, 500)
13968
14031
  );
13969
- if (api.indexOf("?") === -1 && api.indexOf("mocks") === -1) {
13970
- axios.defaults.baseURL = api;
14032
+ if (api2.indexOf("?") === -1 && api2.indexOf("mocks") === -1) {
14033
+ axios.defaults.baseURL = api2;
13971
14034
  }
13972
14035
  return schemaObj;
13973
14036
  };
@@ -13976,11 +14039,11 @@ const buildSchemaObjFromSchema = (schema) => {
13976
14039
  return null;
13977
14040
  }
13978
14041
  const { host, body } = schema;
13979
- const { type, api, ...more2 } = body || {};
14042
+ const { type, api: api2, ...more2 } = body || {};
13980
14043
  if (!host || !type) {
13981
14044
  return null;
13982
14045
  }
13983
- return buildSchema(type, host, api, more2);
14046
+ return buildSchema(type, host, api2, more2);
13984
14047
  };
13985
14048
  function useSchema() {
13986
14049
  const { fetchSwaggerInfo } = useSwagger$1();
@@ -14623,7 +14686,7 @@ function DataSourceSelect(props) {
14623
14686
  size: "small",
14624
14687
  placeholder: "\u8BF7\u8F93\u5165\u503C"
14625
14688
  }), /* @__PURE__ */ React$1.createElement(Button, {
14626
- className: styles$d.staticValueOkBtn,
14689
+ className: styles$e.staticValueOkBtn,
14627
14690
  size: "small",
14628
14691
  onClick: onOkQuery
14629
14692
  }, "\u786E\u5B9A")) : null, panelSelectValue === "$TABLE.RECORD_DATA" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -14634,7 +14697,7 @@ function DataSourceSelect(props) {
14634
14697
  size: "small",
14635
14698
  placeholder: "\u8BF7\u8F93\u5165\u503C"
14636
14699
  }), /* @__PURE__ */ React$1.createElement(Button, {
14637
- className: styles$d.staticValueOkBtn,
14700
+ className: styles$e.staticValueOkBtn,
14638
14701
  size: "small",
14639
14702
  onClick: onOkRecordData
14640
14703
  }, "\u786E\u5B9A")) : null, panelSelectValue === "$PARAMS" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -14645,7 +14708,7 @@ function DataSourceSelect(props) {
14645
14708
  size: "small",
14646
14709
  placeholder: "\u8BF7\u8F93\u5165\u503C"
14647
14710
  }), /* @__PURE__ */ React$1.createElement(Button, {
14648
- className: styles$d.staticValueOkBtn,
14711
+ className: styles$e.staticValueOkBtn,
14649
14712
  size: "small",
14650
14713
  onClick: onOkParams
14651
14714
  }, "\u786E\u5B9A")) : null, panelSelectValue === "staticValue" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -14656,7 +14719,7 @@ function DataSourceSelect(props) {
14656
14719
  placeholder: "\u8BF7\u8F93\u5165\u503C",
14657
14720
  size: "small"
14658
14721
  }), /* @__PURE__ */ React$1.createElement(Button, {
14659
- className: styles$d.staticValueOkBtn,
14722
+ className: styles$e.staticValueOkBtn,
14660
14723
  size: "small",
14661
14724
  onClick: onOkStatic
14662
14725
  }, "\u786E\u5B9A")) : null) : null);
@@ -14685,12 +14748,12 @@ function DataSourceSelect(props) {
14685
14748
  type: "primary",
14686
14749
  text: true,
14687
14750
  size: "small",
14688
- className: styles$d.tableDeleteBtn,
14751
+ className: styles$e.tableDeleteBtn,
14689
14752
  onClick: () => commonTableDelete(value2, index2, record, "params")
14690
14753
  }, "\u5220\u9664"));
14691
14754
  };
14692
14755
  return /* @__PURE__ */ React$1.createElement("div", null, /* @__PURE__ */ React$1.createElement("div", {
14693
- className: styles$d.dsTitle
14756
+ className: styles$e.dsTitle
14694
14757
  }, "\u5165\u53C2:"), /* @__PURE__ */ React$1.createElement("div", {
14695
14758
  style: { marginBottom: 8 }
14696
14759
  }, /* @__PURE__ */ React$1.createElement(Button, {
@@ -14724,9 +14787,9 @@ function DataSourceSelect(props) {
14724
14787
  };
14725
14788
  const renderWatch = () => {
14726
14789
  return /* @__PURE__ */ React$1.createElement("div", {
14727
- className: styles$d.watchContainer
14790
+ className: styles$e.watchContainer
14728
14791
  }, /* @__PURE__ */ React$1.createElement("div", {
14729
- className: styles$d.dsTitleWatch
14792
+ className: styles$e.dsTitleWatch
14730
14793
  }, "\u89E6\u53D1\u65F6\u673A:"), /* @__PURE__ */ React$1.createElement(Select$2, {
14731
14794
  mode: "multiple",
14732
14795
  showSearch: true,
@@ -15004,7 +15067,7 @@ function DataSourceSelect(props) {
15004
15067
  placeholder: "\u8BF7\u8F93\u5165\u503C",
15005
15068
  size: "small"
15006
15069
  }), /* @__PURE__ */ React$1.createElement(Button, {
15007
- className: styles$d.staticValueOkBtn,
15070
+ className: styles$e.staticValueOkBtn,
15008
15071
  size: "small",
15009
15072
  onClick: onOkQuery
15010
15073
  }, "\u786E\u5B9A")) : null, panelSelectValue === "staticValue" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -15015,7 +15078,7 @@ function DataSourceSelect(props) {
15015
15078
  placeholder: "\u8BF7\u8F93\u5165\u503C",
15016
15079
  size: "small"
15017
15080
  }), /* @__PURE__ */ React$1.createElement(Button, {
15018
- className: styles$d.staticValueOkBtn,
15081
+ className: styles$e.staticValueOkBtn,
15019
15082
  size: "small",
15020
15083
  onClick: onOkStatic
15021
15084
  }, "\u786E\u5B9A")) : null, panelSelectValue === "$RET" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -15026,7 +15089,7 @@ function DataSourceSelect(props) {
15026
15089
  placeholder: "\u8BF7\u8F93\u5165\u503C",
15027
15090
  size: "small"
15028
15091
  }), /* @__PURE__ */ React$1.createElement(Button, {
15029
- className: styles$d.staticValueOkBtn,
15092
+ className: styles$e.staticValueOkBtn,
15030
15093
  size: "small",
15031
15094
  onClick: onOkRet
15032
15095
  }, "\u786E\u5B9A")) : null, panelSelectValue === "$PARAMS" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -15037,7 +15100,7 @@ function DataSourceSelect(props) {
15037
15100
  size: "small",
15038
15101
  placeholder: "\u8BF7\u8F93\u5165\u503C"
15039
15102
  }), /* @__PURE__ */ React$1.createElement(Button, {
15040
- className: styles$d.staticValueOkBtn,
15103
+ className: styles$e.staticValueOkBtn,
15041
15104
  size: "small",
15042
15105
  onClick: onOkParams
15043
15106
  }, "\u786E\u5B9A")) : null, panelSelectValue === "$TABLE.RECORD_DATA" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -15048,7 +15111,7 @@ function DataSourceSelect(props) {
15048
15111
  size: "small",
15049
15112
  placeholder: "\u8BF7\u8F93\u5165\u503C"
15050
15113
  }), /* @__PURE__ */ React$1.createElement(Button, {
15051
- className: styles$d.staticValueOkBtn,
15114
+ className: styles$e.staticValueOkBtn,
15052
15115
  size: "small",
15053
15116
  onClick: onOkRecordData
15054
15117
  }, "\u786E\u5B9A")) : null) : null);
@@ -15086,9 +15149,9 @@ function DataSourceSelect(props) {
15086
15149
  }, "\u5220\u9664");
15087
15150
  };
15088
15151
  return /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement("div", {
15089
- className: styles$d.dsTitle
15152
+ className: styles$e.dsTitle
15090
15153
  }, "\u683C\u5F0F\u5316\u51FA\u53C2:"), /* @__PURE__ */ React$1.createElement("div", {
15091
- className: styles$d.actionButton
15154
+ className: styles$e.actionButton
15092
15155
  }, /* @__PURE__ */ React$1.createElement(Button, {
15093
15156
  onClick: onResponseAdd,
15094
15157
  size: "small"
@@ -15118,9 +15181,9 @@ function DataSourceSelect(props) {
15118
15181
  })));
15119
15182
  };
15120
15183
  return /* @__PURE__ */ React$1.createElement("div", {
15121
- className: styles$d.dsContainer
15184
+ className: styles$e.dsContainer
15122
15185
  }, hasExtra && !defaultAjax ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement("div", {
15123
- className: styles$d.dsType
15186
+ className: styles$e.dsType
15124
15187
  }, /* @__PURE__ */ React$1.createElement(RadioGroup$1, {
15125
15188
  value: typeValue,
15126
15189
  onChange: onTypeChange,
@@ -15150,9 +15213,9 @@ function DataSourceSelect(props) {
15150
15213
  filter: mainDataSourceFilter,
15151
15214
  ...selectProps
15152
15215
  }) : null, hasExtra && typeValue === "json" ? /* @__PURE__ */ React$1.createElement("div", {
15153
- className: styles$d.dsJSONContent
15216
+ className: styles$e.dsJSONContent
15154
15217
  }, /* @__PURE__ */ React$1.createElement("div", {
15155
- className: styles$d.dsJSONContentTip
15218
+ className: styles$e.dsJSONContentTip
15156
15219
  }, "\u8BF7\u8F93\u5165json(\u63D0\u793A\uFF1Ajson\u7684key\u9700\u8981\u52A0\u4E0A\u53CC\u5F15\u53F7)"), /* @__PURE__ */ React$1.createElement(MonacoEditor, {
15157
15220
  value: codeMirrorJsonObj,
15158
15221
  onChange: (v2, viewUpdate) => {
@@ -15165,9 +15228,9 @@ function DataSourceSelect(props) {
15165
15228
  }
15166
15229
  }
15167
15230
  })) : null, hasExtra && typeValue === "ajax" ? /* @__PURE__ */ React$1.createElement("div", {
15168
- className: styles$d.dsAjaxContent
15231
+ className: styles$e.dsAjaxContent
15169
15232
  }, showWatch && !defaultAjax && renderWatch(), renderParamsTable(), renderFormatResponse()) : null, hasExtra && showSecondConfirm && typeValue === "ajax" ? /* @__PURE__ */ React$1.createElement("div", {
15170
- className: styles$d.secondConfirm
15233
+ className: styles$e.secondConfirm
15171
15234
  }, /* @__PURE__ */ React$1.createElement(Checkbox, {
15172
15235
  checked: secondConfirmValue,
15173
15236
  onChange: secondConfirmChange
@@ -15198,7 +15261,7 @@ const dsTitleWatch = "_dsTitleWatch_1islj_28";
15198
15261
  const staticValueOkBtn = "_staticValueOkBtn_1islj_33";
15199
15262
  const tableDeleteBtn = "_tableDeleteBtn_1islj_37";
15200
15263
  const secondConfirm = "_secondConfirm_1islj_41";
15201
- var styles$c = {
15264
+ var styles$d = {
15202
15265
  dsType,
15203
15266
  dsJSONContent,
15204
15267
  dsJSONContentTip,
@@ -15561,7 +15624,7 @@ function ParamsSelect(props) {
15561
15624
  size: "small",
15562
15625
  placeholder: "\u8BF7\u8F93\u5165\u503C"
15563
15626
  }), /* @__PURE__ */ React$1.createElement(Button, {
15564
- className: styles$c.staticValueOkBtn,
15627
+ className: styles$d.staticValueOkBtn,
15565
15628
  size: "small",
15566
15629
  onClick: onOkQuery
15567
15630
  }, "\u786E\u5B9A")) : null, panelSelectValue === "$PARAMS" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -15572,7 +15635,7 @@ function ParamsSelect(props) {
15572
15635
  size: "small",
15573
15636
  placeholder: "\u8BF7\u8F93\u5165\u503C"
15574
15637
  }), /* @__PURE__ */ React$1.createElement(Button, {
15575
- className: styles$c.staticValueOkBtn,
15638
+ className: styles$d.staticValueOkBtn,
15576
15639
  size: "small",
15577
15640
  onClick: onOkParams
15578
15641
  }, "\u786E\u5B9A")) : null, panelSelectValue === "$TABLE.RECORD_DATA" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -15583,7 +15646,7 @@ function ParamsSelect(props) {
15583
15646
  size: "small",
15584
15647
  placeholder: "\u8BF7\u8F93\u5165\u503C"
15585
15648
  }), /* @__PURE__ */ React$1.createElement(Button, {
15586
- className: styles$c.staticValueOkBtn,
15649
+ className: styles$d.staticValueOkBtn,
15587
15650
  size: "small",
15588
15651
  onClick: onOkRecordData
15589
15652
  }, "\u786E\u5B9A")) : null, panelSelectValue === "$FORM" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -15594,7 +15657,7 @@ function ParamsSelect(props) {
15594
15657
  size: "small",
15595
15658
  placeholder: "\u8BF7\u8F93\u5165\u503C"
15596
15659
  }), /* @__PURE__ */ React$1.createElement(Button, {
15597
- className: styles$c.staticValueOkBtn,
15660
+ className: styles$d.staticValueOkBtn,
15598
15661
  size: "small",
15599
15662
  onClick: onOkForm
15600
15663
  }, "\u786E\u5B9A")) : null, panelSelectValue === "staticValue" ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(Input$1, {
@@ -15605,7 +15668,7 @@ function ParamsSelect(props) {
15605
15668
  placeholder: "\u8BF7\u8F93\u5165\u503C",
15606
15669
  size: "small"
15607
15670
  }), /* @__PURE__ */ React$1.createElement(Button, {
15608
- className: styles$c.staticValueOkBtn,
15671
+ className: styles$d.staticValueOkBtn,
15609
15672
  size: "small",
15610
15673
  onClick: onOkStatic
15611
15674
  }, "\u786E\u5B9A")) : null) : null);
@@ -15634,7 +15697,7 @@ function ParamsSelect(props) {
15634
15697
  type: "primary",
15635
15698
  text: true,
15636
15699
  size: "small",
15637
- className: styles$c.tableDeleteBtn,
15700
+ className: styles$d.tableDeleteBtn,
15638
15701
  onClick: () => commonTableDelete(value2, index2, record, "params")
15639
15702
  }, "\u5220\u9664"));
15640
15703
  };
@@ -15662,9 +15725,9 @@ function ParamsSelect(props) {
15662
15725
  })));
15663
15726
  };
15664
15727
  return /* @__PURE__ */ React$1.createElement("div", {
15665
- className: styles$c.dsContainer
15728
+ className: styles$d.dsContainer
15666
15729
  }, /* @__PURE__ */ React$1.createElement("div", {
15667
- className: styles$c.dsAjaxContent
15730
+ className: styles$d.dsAjaxContent
15668
15731
  }, renderParamsTable()));
15669
15732
  }
15670
15733
  const { connect: connect$7, mapReadPretty: mapReadPretty$6, mapProps: mapProps$7 } = formilyReact;
@@ -15838,7 +15901,7 @@ Select$1.AutoComplete = connect$4(
15838
15901
  );
15839
15902
  const container = "_container_t9q14_1";
15840
15903
  const footer = "_footer_t9q14_8";
15841
- var styles$b = {
15904
+ var styles$c = {
15842
15905
  container,
15843
15906
  footer
15844
15907
  };
@@ -15938,14 +16001,14 @@ const FormilyForm = (props) => {
15938
16001
  fixedSpan: 8
15939
16002
  },
15940
16003
  size: "small",
15941
- className: styles$b.container
16004
+ className: styles$c.container
15942
16005
  },
15943
16006
  ...restProps
15944
16007
  }, /* @__PURE__ */ React$1.createElement(SchemaField, {
15945
16008
  components,
15946
16009
  schema: schema == null ? void 0 : schema.schema
15947
16010
  }), children, !hiddenSubmit && /* @__PURE__ */ React$1.createElement("div", {
15948
- className: styles$b.footer
16011
+ className: styles$c.footer
15949
16012
  }, /* @__PURE__ */ React$1.createElement(Submit, {
15950
16013
  ...SubmitProps
15951
16014
  }, "\u63D0\u4EA4")));
@@ -16503,9 +16566,9 @@ function AjaxFormDialog({ title: title2 = "\u6570\u636E\u6E90\u914D\u7F6E", sche
16503
16566
  dataSource: swagger.apiList,
16504
16567
  defaultValue: schema.get("url"),
16505
16568
  onChange: (value) => {
16506
- const api = swagger.getApi(value);
16507
- if (api) {
16508
- schema.setAjaxRequest(value, api.method);
16569
+ const api2 = swagger.getApi(value);
16570
+ if (api2) {
16571
+ schema.setAjaxRequest(value, api2.method);
16509
16572
  } else {
16510
16573
  schema.set("url", value);
16511
16574
  }
@@ -19258,6 +19321,53 @@ var cnGraphicsPercent = (params) => {
19258
19321
  }
19259
19322
  };
19260
19323
  };
19324
+ var BlocksTable = (params) => {
19325
+ const { blocksDataSource = [] } = params || {};
19326
+ return {
19327
+ form: {
19328
+ labelCol: 6,
19329
+ wrapperCol: 16
19330
+ },
19331
+ schema: {
19332
+ type: "object",
19333
+ properties: {
19334
+ blockPath: {
19335
+ title: "\u533A\u5757\u5730\u5740",
19336
+ "x-decorator": "CnFormItem",
19337
+ "x-component": "FormilySelect.AutoComplete",
19338
+ "x-validator": [],
19339
+ "x-component-props": {
19340
+ placeholder: "\u8BF7\u9009\u62E9\u6216\u8005\u8F93\u5165\u533A\u5757\u5730\u5740",
19341
+ hasClear: true,
19342
+ size: "small",
19343
+ style: {
19344
+ width: "100%"
19345
+ }
19346
+ },
19347
+ "x-decorator-props": {},
19348
+ name: "blockPath",
19349
+ enum: blocksDataSource || [],
19350
+ default: "",
19351
+ "x-designable-id": "9efgulzttsh"
19352
+ },
19353
+ parentDataIndex: {
19354
+ type: "string",
19355
+ title: "\u7236\u7EA7 dataIndex",
19356
+ "x-decorator": "CnFormItem",
19357
+ "x-component": "Input",
19358
+ "x-validator": [],
19359
+ "x-component-props": {},
19360
+ "x-decorator-props": {
19361
+ 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"
19362
+ },
19363
+ name: "parentDataIndex",
19364
+ "x-designable-id": "sxbti2p222233122mzk"
19365
+ },
19366
+ "x-designable-id": "loa5555d8t3"
19367
+ }
19368
+ }
19369
+ };
19370
+ };
19261
19371
  var Columns = {
19262
19372
  text: TextSchema,
19263
19373
  tpl: TplSchema,
@@ -19275,7 +19385,8 @@ var Columns = {
19275
19385
  "cn-bank": CnBank,
19276
19386
  "cn-image-text": CnImageText,
19277
19387
  "cn-progress": CnProgress,
19278
- "cn-graphics-percent": cnGraphicsPercent
19388
+ "cn-graphics-percent": cnGraphicsPercent,
19389
+ "blocks-table": BlocksTable
19279
19390
  };
19280
19391
  var TablePagination = {
19281
19392
  form: {
@@ -23792,7 +23903,7 @@ const itemComponent$1 = "_itemComponent_tl8oe_70";
23792
23903
  const itemLabel$1 = "_itemLabel_tl8oe_76";
23793
23904
  const collapseContent$2 = "_collapseContent_tl8oe_81";
23794
23905
  const itemClose$2 = "_itemClose_tl8oe_85";
23795
- var styles$a = {
23906
+ var styles$b = {
23796
23907
  mddTableForm,
23797
23908
  tableFormTitle,
23798
23909
  tableFormContent,
@@ -23870,7 +23981,7 @@ const TitleRender$2 = (props) => {
23870
23981
  setValue({ ...value });
23871
23982
  onChange(value, key);
23872
23983
  };
23873
- const cls = classnames.bind(styles$a)({
23984
+ const cls = classnames.bind(styles$b)({
23874
23985
  itemTitle: "itemTitle",
23875
23986
  "drop-over-upward": isOver && index2 < sourceItem.index,
23876
23987
  "drop-over-downward": isOver && index2 > sourceItem.index
@@ -23886,9 +23997,9 @@ const TitleRender$2 = (props) => {
23886
23997
  onChange: (v2) => titleChange("label", v2),
23887
23998
  placeholder: "\u8F93\u5165\u4E2D\u6587\u540D"
23888
23999
  }), titleType.includes("type") && /* @__PURE__ */ React$1.createElement("div", {
23889
- className: styles$a.itemComponent
24000
+ className: styles$b.itemComponent
23890
24001
  }, /* @__PURE__ */ React$1.createElement("label", {
23891
- className: styles$a.itemLabel
24002
+ className: styles$b.itemLabel
23892
24003
  }, "\u7EC4\u4EF6: "), /* @__PURE__ */ React$1.createElement(Select$2, {
23893
24004
  size: "small",
23894
24005
  autoWidth: false,
@@ -23907,9 +24018,9 @@ const TitleRender$2 = (props) => {
23907
24018
  onChange: (v2) => titleChange("name", v2),
23908
24019
  placeholder: "\u8BF7\u9009\u62E9\u6216\u8005\u8F93\u5165\u53D8\u91CF\u540D"
23909
24020
  }), titleType.includes("groupKey") && /* @__PURE__ */ React$1.createElement("div", {
23910
- className: styles$a.itemComponent
24021
+ className: styles$b.itemComponent
23911
24022
  }, /* @__PURE__ */ React$1.createElement("label", {
23912
- className: styles$a.itemLabel
24023
+ className: styles$b.itemLabel
23913
24024
  }, "\u5206\u7EC4: "), /* @__PURE__ */ React$1.createElement(Input$1, {
23914
24025
  size: "small",
23915
24026
  value: groupKey,
@@ -23918,7 +24029,7 @@ const TitleRender$2 = (props) => {
23918
24029
  })), /* @__PURE__ */ React$1.createElement(Icon, {
23919
24030
  type: "close",
23920
24031
  size: "small",
23921
- className: styles$a.itemClose,
24032
+ className: styles$b.itemClose,
23922
24033
  onClick: onRemove
23923
24034
  }));
23924
24035
  };
@@ -23935,6 +24046,7 @@ const ContentRender$2 = (props) => {
23935
24046
  const [uuid, setUuid] = useState(uuidv4());
23936
24047
  const { dataMap, getModule } = useModule$1();
23937
24048
  const moduleDataSource = getModule("$ModuleDataSource");
24049
+ const blocksDataSource = getModule("$BlocksDataSource");
23938
24050
  React$1.useEffect(
23939
24051
  debounce_1(() => {
23940
24052
  setUuid(uuidv4());
@@ -23942,7 +24054,7 @@ const ContentRender$2 = (props) => {
23942
24054
  [watchFields(listSchema)]
23943
24055
  );
23944
24056
  const realSchema = useMemo(() => {
23945
- const srcSchema = getRealSchema(formilySchema2 || schema, { moduleDataSource, listSchema });
24057
+ const srcSchema = getRealSchema(formilySchema2 || schema, { moduleDataSource, listSchema, blocksDataSource });
23946
24058
  return getRealCompSchema(srcSchema, extraFieldSchema2);
23947
24059
  }, [formilySchema2, schema, extraFieldSchema2, moduleDataSource, uuid, listSchema]);
23948
24060
  const formilyForm = useMemo(() => {
@@ -23970,7 +24082,7 @@ const ContentRender$2 = (props) => {
23970
24082
  };
23971
24083
  }, [type, updateForceFLag, realSchema]);
23972
24084
  return /* @__PURE__ */ React$1.createElement("div", {
23973
- className: styles$a.collapseContent
24085
+ className: styles$b.collapseContent
23974
24086
  }, /* @__PURE__ */ React$1.createElement(FormilyForm$1, {
23975
24087
  ...formilyForm,
23976
24088
  hiddenSubmit: true
@@ -24045,9 +24157,9 @@ function MddTableForm(props, ref) {
24045
24157
  forceUpdate();
24046
24158
  };
24047
24159
  return /* @__PURE__ */ React$1.createElement("div", {
24048
- className: styles$a.mddTableForm
24160
+ className: styles$b.mddTableForm
24049
24161
  }, /* @__PURE__ */ React$1.createElement("div", {
24050
- className: styles$a.tableFormTitle
24162
+ className: styles$b.tableFormTitle
24051
24163
  }, /* @__PURE__ */ React$1.createElement("div", null, title2, tip && /* @__PURE__ */ React$1.createElement(Tooltip, {
24052
24164
  trigger: /* @__PURE__ */ React$1.createElement(Icon, {
24053
24165
  type: "help",
@@ -24055,9 +24167,9 @@ function MddTableForm(props, ref) {
24055
24167
  }),
24056
24168
  align: "t"
24057
24169
  }, tip)), actionContent && /* @__PURE__ */ React$1.createElement("div", {
24058
- className: styles$a.tableFormAction
24170
+ className: styles$b.tableFormAction
24059
24171
  }, actionContent)), /* @__PURE__ */ React$1.createElement("div", {
24060
- className: styles$a.tableFormContent
24172
+ className: styles$b.tableFormContent
24061
24173
  }, /* @__PURE__ */ React$1.createElement(DndProvider, {
24062
24174
  backend: HTML5Backend
24063
24175
  }, /* @__PURE__ */ React$1.createElement(Collapse, {
@@ -24099,7 +24211,7 @@ function MddTableForm(props, ref) {
24099
24211
  }
24100
24212
  }));
24101
24213
  })))), /* @__PURE__ */ React$1.createElement("div", {
24102
- className: styles$a.tableFormBottom
24214
+ className: styles$b.tableFormBottom
24103
24215
  }, /* @__PURE__ */ React$1.createElement(Button, {
24104
24216
  onClick: onAddHandle,
24105
24217
  style: { padding: "0 48px" }
@@ -24139,7 +24251,7 @@ const FormTitle = "_FormTitle_1e2nn_20";
24139
24251
  const FormTitleHelp = "_FormTitleHelp_1e2nn_24";
24140
24252
  const FormContent = "_FormContent_1e2nn_30";
24141
24253
  const content = "_content_1e2nn_35";
24142
- var styles$9 = {
24254
+ var styles$a = {
24143
24255
  mddForm,
24144
24256
  FormTitle,
24145
24257
  FormTitleHelp,
@@ -24169,7 +24281,7 @@ const ContentRender$1 = (props) => {
24169
24281
  };
24170
24282
  }, [schema]);
24171
24283
  return /* @__PURE__ */ React$1.createElement("div", {
24172
- className: styles$9.content
24284
+ className: styles$a.content
24173
24285
  }, /* @__PURE__ */ React$1.createElement(FormilyForm$1, {
24174
24286
  ...formilyForm,
24175
24287
  hiddenSubmit: true
@@ -24189,14 +24301,14 @@ function MddForm(props) {
24189
24301
  contentStyle
24190
24302
  } = props;
24191
24303
  return /* @__PURE__ */ React$1.createElement("div", {
24192
- className: styles$9.mddForm,
24304
+ className: styles$a.mddForm,
24193
24305
  style: style2
24194
24306
  }, /* @__PURE__ */ React$1.createElement("div", {
24195
- className: styles$9.FormTitle
24307
+ className: styles$a.FormTitle
24196
24308
  }, title2), help && /* @__PURE__ */ React$1.createElement("div", {
24197
- className: styles$9.FormTitleHelp
24309
+ className: styles$a.FormTitleHelp
24198
24310
  }, help), /* @__PURE__ */ React$1.createElement("div", {
24199
- className: styles$9.FormContent,
24311
+ className: styles$a.FormContent,
24200
24312
  style: contentStyle
24201
24313
  }, children || /* @__PURE__ */ React$1.createElement(ContentRender$1, {
24202
24314
  values: data,
@@ -24324,6 +24436,10 @@ const columnsTypeOptions = [
24324
24436
  value: "images",
24325
24437
  label: "\u9644\u4EF6/\u56FE\u7247"
24326
24438
  },
24439
+ {
24440
+ value: "blocks-table",
24441
+ label: "\u5217\u8868\u533A\u5757"
24442
+ },
24327
24443
  {
24328
24444
  value: "custom",
24329
24445
  label: "\u81EA\u5B9A\u4E49"
@@ -24389,6 +24505,10 @@ const columnsTypeOptionsWithEditCnTable = [
24389
24505
  value: "edit-cascader-select",
24390
24506
  label: "\u7EA7\u8054\u9009\u62E9\u5668"
24391
24507
  },
24508
+ {
24509
+ value: "blocks-table",
24510
+ label: "\u5217\u8868\u533A\u5757"
24511
+ },
24392
24512
  {
24393
24513
  value: "edit-custom",
24394
24514
  label: "\u81EA\u5B9A\u4E49"
@@ -24609,7 +24729,7 @@ function HeaderToolbarPanel$1({ schema, moduleMap }) {
24609
24729
  }
24610
24730
  }));
24611
24731
  }
24612
- function TablePanel$2({ schema, swaggerFields = [] }) {
24732
+ function TablePanel$3({ schema, swaggerFields = [] }) {
24613
24733
  var _a2;
24614
24734
  const columnMddFormRef = React$1.useRef();
24615
24735
  const bulkMddFormRef = React$1.useRef();
@@ -24620,7 +24740,7 @@ function TablePanel$2({ schema, swaggerFields = [] }) {
24620
24740
  schema.on("$updated", (changeData, ignoreUpdate) => {
24621
24741
  !ignoreUpdate && forceUpdate({});
24622
24742
  });
24623
- hackRowDetail(schema);
24743
+ hackRowDetail$1(schema);
24624
24744
  }, []);
24625
24745
  const primaryKey = schema.get("primaryKey");
24626
24746
  const bulkActions = schema.get("bulkActions");
@@ -24904,7 +25024,7 @@ function TablePanel$2({ schema, swaggerFields = [] }) {
24904
25024
  type: "prompt"
24905
25025
  }), " \u5982\u679C\u6709\u6027\u80FD\u95EE\u9898\u53EF\u4EE5\u5173\u95ED\u8BE5\u5C5E\u6027\uFF0C\u540C\u65F6\u624B\u52A8\u8BBE\u7F6E\u5217\u5BBD")));
24906
25026
  }
24907
- function hackRowDetail(schema) {
25027
+ function hackRowDetail$1(schema) {
24908
25028
  const rowDetail = schema.get("rowDetail");
24909
25029
  if (rowDetail) {
24910
25030
  schema.set("rowDetail", void 0);
@@ -24932,7 +25052,7 @@ var _immutabilityHelper_3_1_1_immutabilityHelper = { exports: {} };
24932
25052
  function type(obj) {
24933
25053
  return toString2.call(obj).slice(8, -1);
24934
25054
  }
24935
- var assign = Object.assign || function(target, source) {
25055
+ var assign2 = Object.assign || function(target, source) {
24936
25056
  getAllKeys2(source).forEach(function(key) {
24937
25057
  if (hasOwnProperty2.call(source, key)) {
24938
25058
  target[key] = source[key];
@@ -24946,11 +25066,11 @@ var _immutabilityHelper_3_1_1_immutabilityHelper = { exports: {} };
24946
25066
  return Object.keys(obj);
24947
25067
  };
24948
25068
  function copy(object) {
24949
- return Array.isArray(object) ? assign(object.constructor(object.length), object) : type(object) === "Map" ? new Map(object) : type(object) === "Set" ? new Set(object) : object && typeof object === "object" ? assign(Object.create(Object.getPrototypeOf(object)), object) : object;
25069
+ return Array.isArray(object) ? assign2(object.constructor(object.length), object) : type(object) === "Map" ? new Map(object) : type(object) === "Set" ? new Set(object) : object && typeof object === "object" ? assign2(Object.create(Object.getPrototypeOf(object)), object) : object;
24950
25070
  }
24951
25071
  var Context = function() {
24952
25072
  function Context2() {
24953
- this.commands = assign({}, defaultCommands);
25073
+ this.commands = assign2({}, defaultCommands);
24954
25074
  this.update = this.update.bind(this);
24955
25075
  this.update.extend = this.extend = this.extend.bind(this);
24956
25076
  this.update.isEquals = function(x, y) {
@@ -25109,7 +25229,7 @@ var _immutabilityHelper_3_1_1_immutabilityHelper = { exports: {} };
25109
25229
  exports.isEquals = defaultContext.update.isEquals;
25110
25230
  exports.extend = defaultContext.extend;
25111
25231
  exports.default = defaultContext.update;
25112
- exports.default.default = module.exports = assign(exports.default, exports);
25232
+ exports.default.default = module.exports = assign2(exports.default, exports);
25113
25233
  function invariantPushAndUnshift(value, spec, command) {
25114
25234
  invariant2(Array.isArray(value), function() {
25115
25235
  return "update(): expected target of " + stringifiable(command) + " to be an array; got " + stringifiable(value) + ".";
@@ -25165,7 +25285,7 @@ const tableArrayBottom$1 = "_tableArrayBottom_16ght_32";
25165
25285
  const itemTitle$1 = "_itemTitle_16ght_39";
25166
25286
  const collapseContent$1 = "_collapseContent_16ght_69";
25167
25287
  const itemClose$1 = "_itemClose_16ght_73";
25168
- var styles$8 = {
25288
+ var styles$9 = {
25169
25289
  mddTableArray: mddTableArray$1,
25170
25290
  tableArrayTitle: tableArrayTitle$1,
25171
25291
  tableArrayContent: tableArrayContent$1,
@@ -25210,7 +25330,7 @@ const TitleRender$1 = (props) => {
25210
25330
  });
25211
25331
  const opacity = isDragging ? 0 : 1;
25212
25332
  draggable && drag(drop(ref));
25213
- const cls = classnames.bind(styles$8)({
25333
+ const cls = classnames.bind(styles$9)({
25214
25334
  itemTitle: "itemTitle",
25215
25335
  "drop-over-upward": isOver && index2 < sourceItem.index,
25216
25336
  "drop-over-downward": isOver && index2 > sourceItem.index
@@ -25223,7 +25343,7 @@ const TitleRender$1 = (props) => {
25223
25343
  }, customRender && customRender({ data, index: index2, onChange, moduleDataSource }), /* @__PURE__ */ React$1.createElement(Icon, {
25224
25344
  type: "close",
25225
25345
  size: "small",
25226
- className: styles$8.itemClose,
25346
+ className: styles$9.itemClose,
25227
25347
  onClick: onRemove
25228
25348
  }));
25229
25349
  };
@@ -25260,9 +25380,9 @@ function MddTableSimpleArray(props) {
25260
25380
  onChange({ record, index: index2, data });
25261
25381
  };
25262
25382
  return /* @__PURE__ */ React$1.createElement("div", {
25263
- className: styles$8.mddTableArray
25383
+ className: styles$9.mddTableArray
25264
25384
  }, /* @__PURE__ */ React$1.createElement("div", {
25265
- className: styles$8.tableArrayTitle
25385
+ className: styles$9.tableArrayTitle
25266
25386
  }, title2, tip && /* @__PURE__ */ React$1.createElement(Balloon, {
25267
25387
  trigger: /* @__PURE__ */ React$1.createElement(Icon, {
25268
25388
  type: "help",
@@ -25270,7 +25390,7 @@ function MddTableSimpleArray(props) {
25270
25390
  }),
25271
25391
  align: "t"
25272
25392
  }, tip)), /* @__PURE__ */ React$1.createElement("div", {
25273
- className: styles$8.tableArrayContent
25393
+ className: styles$9.tableArrayContent
25274
25394
  }, /* @__PURE__ */ React$1.createElement(DndProvider, {
25275
25395
  backend: HTML5Backend
25276
25396
  }, /* @__PURE__ */ React$1.createElement(Collapse, {
@@ -25289,28 +25409,28 @@ function MddTableSimpleArray(props) {
25289
25409
  customRender: titleRender
25290
25410
  })
25291
25411
  }, /* @__PURE__ */ React$1.createElement("div", {
25292
- className: styles$8.collapseContent
25412
+ className: styles$9.collapseContent
25293
25413
  }, contentRender2({ data: item, index: idx, onChange: onTableArrayChange })));
25294
25414
  })))), /* @__PURE__ */ React$1.createElement("div", {
25295
- className: styles$8.tableArrayBottom
25415
+ className: styles$9.tableArrayBottom
25296
25416
  }, /* @__PURE__ */ React$1.createElement(Button, {
25297
25417
  onClick: onAdd,
25298
25418
  style: { padding: "0 48px" }
25299
25419
  }, "\u6DFB\u52A0\u9879")));
25300
25420
  }
25301
- const customTabItem$4 = "_customTabItem_119xt_1";
25302
- const tabTitle$4 = "_tabTitle_119xt_5";
25303
- const tabLabel$4 = "_tabLabel_119xt_9";
25304
- const middleBox = "_middleBox_119xt_20";
25305
- const middleBoxLeft = "_middleBoxLeft_119xt_26";
25306
- const middleBoxRight = "_middleBoxRight_119xt_31";
25307
- var styles$7 = {
25308
- customTabItem: customTabItem$4,
25309
- tabTitle: tabTitle$4,
25310
- tabLabel: tabLabel$4,
25311
- middleBox,
25312
- middleBoxLeft,
25313
- middleBoxRight
25421
+ const customTabItem$5 = "_customTabItem_119xt_1";
25422
+ const tabTitle$5 = "_tabTitle_119xt_5";
25423
+ const tabLabel$5 = "_tabLabel_119xt_9";
25424
+ const middleBox$1 = "_middleBox_119xt_20";
25425
+ const middleBoxLeft$1 = "_middleBoxLeft_119xt_26";
25426
+ const middleBoxRight$1 = "_middleBoxRight_119xt_31";
25427
+ var styles$8 = {
25428
+ customTabItem: customTabItem$5,
25429
+ tabTitle: tabTitle$5,
25430
+ tabLabel: tabLabel$5,
25431
+ middleBox: middleBox$1,
25432
+ middleBoxLeft: middleBoxLeft$1,
25433
+ middleBoxRight: middleBoxRight$1
25314
25434
  };
25315
25435
  const Middle_Module_Opts = [
25316
25436
  {
@@ -25365,47 +25485,47 @@ function contentRender$1(props) {
25365
25485
  };
25366
25486
  const moduleValue = schema.get("value");
25367
25487
  return /* @__PURE__ */ React$1.createElement("div", null, /* @__PURE__ */ React$1.createElement("div", {
25368
- className: styles$7.middleBox
25488
+ className: styles$8.middleBox
25369
25489
  }, /* @__PURE__ */ React$1.createElement("label", {
25370
- className: styles$7.middleBoxLeft
25490
+ className: styles$8.middleBoxLeft
25371
25491
  }, "\u6E32\u67D3\u6A21\u5757\uFF1A"), /* @__PURE__ */ React$1.createElement(Select$2.AutoComplete, {
25372
25492
  dataSource: Middle_Module_Opts,
25373
25493
  size: "small",
25374
- className: styles$7.middleBoxRight,
25494
+ className: styles$8.middleBoxRight,
25375
25495
  value: moduleValue,
25376
25496
  onChange: (val) => onBaseInfoChange("value", val)
25377
25497
  })), /* @__PURE__ */ React$1.createElement("div", {
25378
- className: styles$7.middleBox
25498
+ className: styles$8.middleBox
25379
25499
  }, /* @__PURE__ */ React$1.createElement("label", {
25380
- className: styles$7.middleBoxLeft
25500
+ className: styles$8.middleBoxLeft
25381
25501
  }, "\u6A21\u5757\u53C2\u6570\uFF1A"), /* @__PURE__ */ React$1.createElement(TableFormProxy, {
25382
- className: styles$7.middleBoxRight,
25502
+ className: styles$8.middleBoxRight,
25383
25503
  value: schema.get("params"),
25384
25504
  onChange: (v2) => onBaseInfoChange("params", v2)
25385
25505
  })), moduleValue === "ftp-tabs" && /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement("div", {
25386
- className: styles$7.middleBox
25506
+ className: styles$8.middleBox
25387
25507
  }, /* @__PURE__ */ React$1.createElement("label", {
25388
- className: styles$7.middleBoxLeft
25508
+ className: styles$8.middleBoxLeft
25389
25509
  }, "\u63A5\u53E3\u8BF7\u6C42KEY\uFF1A"), /* @__PURE__ */ React$1.createElement(Input$1, {
25390
- className: styles$7.middleBoxRight,
25510
+ className: styles$8.middleBoxRight,
25391
25511
  value: schema.get("dataIndex"),
25392
25512
  size: "small",
25393
25513
  onChange: (v2) => onBaseInfoChange("dataIndex", v2)
25394
25514
  })), /* @__PURE__ */ React$1.createElement("div", {
25395
- className: styles$7.middleBox
25515
+ className: styles$8.middleBox
25396
25516
  }, /* @__PURE__ */ React$1.createElement("label", {
25397
- className: styles$7.middleBoxLeft
25517
+ className: styles$8.middleBoxLeft
25398
25518
  }, "\u9ED8\u8BA4\u503C\uFF1A"), /* @__PURE__ */ React$1.createElement(DynamicValueBase, {
25399
- className: styles$7.middleBoxRight,
25519
+ className: styles$8.middleBoxRight,
25400
25520
  value: schema.get("defaultTabValue"),
25401
25521
  size: "small",
25402
25522
  onChange: (v2) => onBaseInfoChange("defaultTabValue", v2)
25403
25523
  })), /* @__PURE__ */ React$1.createElement("div", {
25404
- className: styles$7.middleBox
25524
+ className: styles$8.middleBox
25405
25525
  }, /* @__PURE__ */ React$1.createElement("label", {
25406
- className: styles$7.middleBoxLeft
25526
+ className: styles$8.middleBoxLeft
25407
25527
  }, "\u591A\u6807\u7B7E\u6570\u636E\u6E90\uFF1A"), /* @__PURE__ */ React$1.createElement("div", {
25408
- className: styles$7.middleBoxRight
25528
+ className: styles$8.middleBoxRight
25409
25529
  }, /* @__PURE__ */ React$1.createElement(AjaxSchemaForm, {
25410
25530
  schema: schema.getSourcePanel(),
25411
25531
  isSelectType: false
@@ -25418,16 +25538,16 @@ function contentRender$1(props) {
25418
25538
  href: "https://alidocs.dingtalk.com/i/nodes/dpYLaezmVNRMGX56C1ZxqyYdVrMqPxX6"
25419
25539
  }, "\u6587\u6863"))))));
25420
25540
  }
25421
- const CustomTabItem$4 = ({ title: title2, icon }) => {
25541
+ const CustomTabItem$5 = ({ title: title2, icon }) => {
25422
25542
  return /* @__PURE__ */ React$1.createElement("div", {
25423
- className: styles$7.customTabItem
25543
+ className: styles$8.customTabItem
25424
25544
  }, /* @__PURE__ */ React$1.createElement("div", {
25425
- className: styles$7.tabTitle
25545
+ className: styles$8.tabTitle
25426
25546
  }, /* @__PURE__ */ React$1.createElement(Icon, {
25427
25547
  type: icon,
25428
25548
  size: "small"
25429
25549
  }), /* @__PURE__ */ React$1.createElement("span", {
25430
- className: styles$7.tabLabel
25550
+ className: styles$8.tabLabel
25431
25551
  }, title2)));
25432
25552
  };
25433
25553
  function FtpBuild$1({ schema, moduleMap }) {
@@ -25442,7 +25562,7 @@ function FtpBuild$1({ schema, moduleMap }) {
25442
25562
  shape: "wrapped",
25443
25563
  tabPosition: "left",
25444
25564
  className: "build-page-tab",
25445
- tabRender: (key, props) => /* @__PURE__ */ React$1.createElement(CustomTabItem$4, {
25565
+ tabRender: (key, props) => /* @__PURE__ */ React$1.createElement(CustomTabItem$5, {
25446
25566
  key,
25447
25567
  ...props
25448
25568
  })
@@ -25467,7 +25587,7 @@ function FtpBuild$1({ schema, moduleMap }) {
25467
25587
  })), /* @__PURE__ */ React$1.createElement(Tab.Item, {
25468
25588
  title: "\u5185\u5BB9\u533A",
25469
25589
  icon: "detail"
25470
- }, /* @__PURE__ */ React$1.createElement(TablePanel$2, {
25590
+ }, /* @__PURE__ */ React$1.createElement(TablePanel$3, {
25471
25591
  schema: schema.getTablePanel(),
25472
25592
  swaggerFields: responseFields,
25473
25593
  moduleMap
@@ -25484,6 +25604,106 @@ function FtpBuild$1({ schema, moduleMap }) {
25484
25604
  isSelectType: false
25485
25605
  }))));
25486
25606
  }
25607
+ function TablePanel$2({ schema, swaggerFields = [] }) {
25608
+ const columnMddFormRef = React$1.useRef();
25609
+ const [_2, forceUpdate] = useState({});
25610
+ useEffect(() => {
25611
+ schema.on("$updated", (changeData, ignoreUpdate) => {
25612
+ !ignoreUpdate && forceUpdate({});
25613
+ });
25614
+ hackRowDetail(schema);
25615
+ }, []);
25616
+ const columns = schema.get("columns");
25617
+ const onAddHandle = (key) => {
25618
+ var _a2;
25619
+ switch (key) {
25620
+ case "columns":
25621
+ schema.add(
25622
+ {
25623
+ type: "text",
25624
+ label: "\u5C55\u793A\u9879",
25625
+ name: ""
25626
+ },
25627
+ "columns",
25628
+ true
25629
+ );
25630
+ (_a2 = columnMddFormRef.current) == null ? void 0 : _a2.updateData(schema.get("columns"));
25631
+ break;
25632
+ }
25633
+ };
25634
+ const onRemoveHandle = (index2, key) => {
25635
+ var _a2;
25636
+ schema.remove(index2, key, true);
25637
+ if (key === "columns") {
25638
+ (_a2 = columnMddFormRef.current) == null ? void 0 : _a2.updateData(schema.get("columns"));
25639
+ }
25640
+ };
25641
+ const onChangeHandle = ({ index: index2, record }, key) => {
25642
+ schema.update(index2, record, key, true);
25643
+ };
25644
+ return /* @__PURE__ */ React$1.createElement("div", null, /* @__PURE__ */ React$1.createElement(MddTableForm$1, {
25645
+ ref: columnMddFormRef,
25646
+ data: columns,
25647
+ title: "\u914D\u7F6E\u8868\u683C\u5217",
25648
+ componentOptions: columnsTypeOptionsWithCnTable.filter((col) => col.value !== "blocks-table"),
25649
+ onAdd: () => onAddHandle("columns"),
25650
+ onRemove: (index2) => onRemoveHandle(index2, "columns"),
25651
+ onChange: ({ index: index2, record }) => onChangeHandle({ index: index2, record }, "columns"),
25652
+ onSort: (newList) => {
25653
+ schema.setItemAll(newList, "columns", true);
25654
+ }
25655
+ }));
25656
+ }
25657
+ function hackRowDetail(schema) {
25658
+ const rowDetail = schema.get("rowDetail");
25659
+ if (rowDetail) {
25660
+ schema.set("rowDetail", void 0);
25661
+ }
25662
+ }
25663
+ const customTabItem$4 = "_customTabItem_119xt_1";
25664
+ const tabTitle$4 = "_tabTitle_119xt_5";
25665
+ const tabLabel$4 = "_tabLabel_119xt_9";
25666
+ const middleBox = "_middleBox_119xt_20";
25667
+ const middleBoxLeft = "_middleBoxLeft_119xt_26";
25668
+ const middleBoxRight = "_middleBoxRight_119xt_31";
25669
+ var styles$7 = {
25670
+ customTabItem: customTabItem$4,
25671
+ tabTitle: tabTitle$4,
25672
+ tabLabel: tabLabel$4,
25673
+ middleBox,
25674
+ middleBoxLeft,
25675
+ middleBoxRight
25676
+ };
25677
+ const CustomTabItem$4 = ({ title: title2, icon }) => {
25678
+ return /* @__PURE__ */ React$1.createElement("div", {
25679
+ className: styles$7.customTabItem
25680
+ }, /* @__PURE__ */ React$1.createElement("div", {
25681
+ className: styles$7.tabTitle
25682
+ }, /* @__PURE__ */ React$1.createElement(Icon, {
25683
+ type: icon,
25684
+ size: "small"
25685
+ }), /* @__PURE__ */ React$1.createElement("span", {
25686
+ className: styles$7.tabLabel
25687
+ }, title2)));
25688
+ };
25689
+ function BlocksBuild({ schema, moduleMap }) {
25690
+ return /* @__PURE__ */ React$1.createElement(Tab, {
25691
+ animation: false,
25692
+ lazyLoad: false,
25693
+ shape: "wrapped",
25694
+ tabPosition: "left",
25695
+ className: "build-page-tab",
25696
+ tabRender: (key, props) => /* @__PURE__ */ React$1.createElement(CustomTabItem$4, {
25697
+ key,
25698
+ ...props
25699
+ })
25700
+ }, /* @__PURE__ */ React$1.createElement(Tab.Item, {
25701
+ title: "\u5185\u5BB9\u533A",
25702
+ icon: "detail"
25703
+ }, /* @__PURE__ */ React$1.createElement(TablePanel$2, {
25704
+ schema: schema.getTablePanel()
25705
+ })));
25706
+ }
25487
25707
  const mddTableArray = "_mddTableArray_16ght_1";
25488
25708
  const tableArrayTitle = "_tableArrayTitle_16ght_14";
25489
25709
  const tableArrayContent = "_tableArrayContent_16ght_18";
@@ -27297,6 +27517,7 @@ function MDDEditor(props) {
27297
27517
  customSchema,
27298
27518
  moduleDataSource,
27299
27519
  refreshModuleDataSource,
27520
+ blocksDataSource,
27300
27521
  moduleMap = /* @__PURE__ */ new Map(),
27301
27522
  scriptTopButtons = []
27302
27523
  } = props;
@@ -27307,7 +27528,8 @@ function MDDEditor(props) {
27307
27528
  React$1.useEffect(() => {
27308
27529
  setModules({
27309
27530
  $ModuleDataSource: moduleDataSource,
27310
- $RefreshModuleDataSource: refreshModuleDataSource
27531
+ $RefreshModuleDataSource: refreshModuleDataSource,
27532
+ $BlocksDataSource: blocksDataSource
27311
27533
  });
27312
27534
  console.log("moduleDataSource: ", moduleDataSource);
27313
27535
  window.__MDD_ModuleDataSource = moduleDataSource;
@@ -27418,6 +27640,9 @@ function getCompAndSchemaFromSchemaJson(schemaJson, customComponent, customSchem
27418
27640
  case "edit-table": {
27419
27641
  return [customComponent || FtpBuild, customSchema || FtpSchema];
27420
27642
  }
27643
+ case "blocks-table": {
27644
+ return [customComponent || BlocksBuild, customSchema || BlocksSchema];
27645
+ }
27421
27646
  default:
27422
27647
  return null;
27423
27648
  }