@wibetter/json-editor 5.0.8 → 5.0.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/sdk/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.0.7
2
+ * @wibetter/json-editor v5.0.9
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Dec 24 2024 14:44:56 GMT+0800 (中国标准时间)
5
+ * build time: Thu Dec 26 2024 13:24:07 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -98415,37 +98415,46 @@ styles.join("\\n")
98415
98415
  // 是否显示code模式,默认不显示code模式
98416
98416
  viewStyle: _this.catchViewStyle(props.viewStyle), // 默认为fold(可折叠面板),可选:tabs:(tabs切换面板)
98417
98417
  };
98418
+ var _ref = _this.props.schemaStore || {},
98419
+ initJSONSchemaData = _ref.initJSONSchemaData,
98420
+ setPageScreen = _ref.setPageScreen;
98421
+ var _ref2 = _this.props.jsonStore || {},
98422
+ initJSONData = _ref2.initJSONData,
98423
+ initOnChange = _ref2.initOnChange,
98424
+ setDynamicDataList = _ref2.setDynamicDataList,
98425
+ setOptions = _ref2.setOptions;
98426
+
98418
98427
  // 根据props.schemaData对jsonSchema进行初始化
98419
98428
  if (props.schemaData) {
98420
- _this.props.initJSONSchemaData(props.schemaData);
98429
+ initJSONSchemaData(props.schemaData);
98421
98430
  // 根据props.jsonData对jsonData进行初始化
98422
- _this.props.initJSONData(props.jsonData);
98431
+ initJSONData(props.jsonData);
98423
98432
  } else if (props.jsonData) {
98424
98433
  // schemaData为空,jsonData不为空时,尝试通过jsonData转jsonSchema
98425
98434
  var jsonSchema = (0,
98426
98435
  _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_7__.json2schema)(
98427
98436
  props.jsonData,
98428
98437
  ); // 通过json转换schema
98429
- _this.props.initJSONSchemaData(jsonSchema);
98438
+ initJSONSchemaData(jsonSchema);
98430
98439
  // 根据props.jsonData对jsonData进行初始化
98431
- _this.props.initJSONData(props.jsonData);
98440
+ initJSONData(props.jsonData);
98432
98441
  }
98433
98442
  // 读取宽屏和小屏的配置
98434
98443
  if (props.wideScreen) {
98435
- _this.props.setPageScreen(props.wideScreen);
98444
+ setPageScreen(props.wideScreen);
98436
98445
  }
98437
98446
  // 记录onChange事件
98438
98447
  if (props.onChange) {
98439
- _this.props.initOnChange(props.onChange);
98448
+ initOnChange(props.onChange);
98440
98449
  }
98441
98450
 
98442
98451
  // 获取dynamicDataList(动态数据源)
98443
98452
  if (props.dynamicDataList) {
98444
- _this.props.setDynamicDataList(props.dynamicDataList);
98453
+ setDynamicDataList(props.dynamicDataList);
98445
98454
  }
98446
98455
  // 配置类数据
98447
98456
  if (props.options) {
98448
- _this.props.setOptions(props.options);
98457
+ setOptions(props.options);
98449
98458
  }
98450
98459
  return _this;
98451
98460
  }
@@ -98456,6 +98465,14 @@ styles.join("\\n")
98456
98465
  var _proto = JSONDataEditor.prototype;
98457
98466
  _proto.componentWillReceiveProps =
98458
98467
  function componentWillReceiveProps(nextProps) {
98468
+ var _ref3 = this.props.schemaStore || {},
98469
+ JSONSchemaChange = _ref3.JSONSchemaChange,
98470
+ setPageScreen = _ref3.setPageScreen;
98471
+ var _ref4 = this.props.jsonStore || {},
98472
+ initJSONData = _ref4.initJSONData,
98473
+ initOnChange = _ref4.initOnChange,
98474
+ setDynamicDataList = _ref4.setDynamicDataList,
98475
+ setOptions = _ref4.setOptions;
98459
98476
  /** 1. 先初始化schemaData,如果jsonData和schemaData的格式不一致,则以schemaData为准 */
98460
98477
  if (
98461
98478
  !(0, $utils_index__WEBPACK_IMPORTED_MODULE_6__.isEqual)(
@@ -98463,7 +98480,7 @@ styles.join("\\n")
98463
98480
  this.props.schemaData,
98464
98481
  )
98465
98482
  ) {
98466
- this.props.JSONSchemaChange(nextProps.schemaData);
98483
+ JSONSchemaChange(nextProps.schemaData);
98467
98484
  }
98468
98485
  /** 2. 初始化jsonData */
98469
98486
  if (
@@ -98472,7 +98489,7 @@ styles.join("\\n")
98472
98489
  this.props.jsonData,
98473
98490
  )
98474
98491
  ) {
98475
- this.props.initJSONData(nextProps.jsonData);
98492
+ initJSONData(nextProps.jsonData);
98476
98493
  }
98477
98494
  // 读取code模式配置
98478
98495
  if (
@@ -98502,7 +98519,7 @@ styles.join("\\n")
98502
98519
  this.props.wideScreen,
98503
98520
  )
98504
98521
  ) {
98505
- this.props.setPageScreen(nextProps.wideScreen);
98522
+ setPageScreen(nextProps.wideScreen);
98506
98523
  }
98507
98524
  // 记录onChange事件
98508
98525
  if (
@@ -98511,7 +98528,7 @@ styles.join("\\n")
98511
98528
  this.props.onChange,
98512
98529
  )
98513
98530
  ) {
98514
- this.props.initOnChange(nextProps.onChange);
98531
+ initOnChange(nextProps.onChange);
98515
98532
  }
98516
98533
 
98517
98534
  // 获取dynamicDataList(动态数据源)
@@ -98521,7 +98538,7 @@ styles.join("\\n")
98521
98538
  this.props.dynamicDataList,
98522
98539
  )
98523
98540
  ) {
98524
- this.props.setDynamicDataList(nextProps.dynamicDataList);
98541
+ setDynamicDataList(nextProps.dynamicDataList);
98525
98542
  }
98526
98543
  if (
98527
98544
  !(0, $utils_index__WEBPACK_IMPORTED_MODULE_6__.isEqual)(
@@ -98529,18 +98546,19 @@ styles.join("\\n")
98529
98546
  this.props.options,
98530
98547
  )
98531
98548
  ) {
98532
- this.props.setOptions(nextProps.options);
98549
+ setOptions(nextProps.options);
98533
98550
  }
98534
98551
  };
98535
98552
  _proto.render = function render() {
98536
98553
  var _this2 = this;
98537
98554
  var _this$props = this.props,
98538
- jsonSchema = _this$props.jsonSchema,
98539
- lastUpdateTime = _this$props.lastUpdateTime,
98540
- jsonLastUpdateTime = _this$props.jsonLastUpdateTime,
98541
- getJSONDataByKeyRoute = _this$props.getJSONDataByKeyRoute,
98542
- keyRoute2indexRoute = _this$props.keyRoute2indexRoute,
98543
- updateFormValueData = _this$props.updateFormValueData;
98555
+ schemaStore = _this$props.schemaStore,
98556
+ jsonStore = _this$props.jsonStore;
98557
+ var _ref5 = schemaStore || {},
98558
+ jsonSchema = _ref5.jsonSchema,
98559
+ lastUpdateTime = _ref5.lastUpdateTime;
98560
+ var _ref6 = jsonStore || {},
98561
+ jsonLastUpdateTime = _ref6.lastUpdateTime;
98544
98562
  var _this$state = this.state,
98545
98563
  jsonView = _this$state.jsonView,
98546
98564
  viewStyle = _this$state.viewStyle;
@@ -98628,10 +98646,8 @@ styles.join("\\n")
98628
98646
  nodeKey: nodeKey,
98629
98647
  targetJsonSchema: currentSchemaData,
98630
98648
  isStructuredSchema: isStructured,
98631
- getJSONDataByKeyRoute:
98632
- getJSONDataByKeyRoute,
98633
- keyRoute2indexRoute: keyRoute2indexRoute,
98634
- updateFormValueData: updateFormValueData,
98649
+ schemaStore: schemaStore,
98650
+ jsonStore: jsonStore,
98635
98651
  }),
98636
98652
  );
98637
98653
  }
@@ -98692,10 +98708,8 @@ styles.join("\\n")
98692
98708
  nodeKey: nodeKey,
98693
98709
  targetJsonSchema: currentSchemaData,
98694
98710
  isStructuredSchema: isStructured,
98695
- getJSONDataByKeyRoute:
98696
- getJSONDataByKeyRoute,
98697
- keyRoute2indexRoute: keyRoute2indexRoute,
98698
- updateFormValueData: updateFormValueData,
98711
+ schemaStore: schemaStore,
98712
+ jsonStore: jsonStore,
98699
98713
  }),
98700
98714
  );
98701
98715
  }
@@ -98717,9 +98731,8 @@ styles.join("\\n")
98717
98731
  keyRoute: '',
98718
98732
  nodeKey: '',
98719
98733
  targetJsonSchema: jsonSchema,
98720
- getJSONDataByKeyRoute: getJSONDataByKeyRoute,
98721
- keyRoute2indexRoute: keyRoute2indexRoute,
98722
- updateFormValueData: updateFormValueData,
98734
+ schemaStore: schemaStore,
98735
+ jsonStore: jsonStore,
98723
98736
  }),
98724
98737
  ),
98725
98738
  ),
@@ -98754,20 +98767,8 @@ styles.join("\\n")
98754
98767
  /* harmony default export */ __webpack_exports__['default'] = (0,
98755
98768
  mobx_react__WEBPACK_IMPORTED_MODULE_10__.inject)(function (stores) {
98756
98769
  return {
98757
- jsonSchema: stores.JSONSchemaStore.jsonSchema,
98758
- lastUpdateTime: stores.JSONSchemaStore.lastUpdateTime,
98759
- jsonLastUpdateTime: stores.JSONEditorStore.lastUpdateTime,
98760
- initJSONSchemaData: stores.JSONSchemaStore.initJSONSchemaData,
98761
- JSONSchemaChange: stores.JSONSchemaStore.JSONSchemaChange,
98762
- initJSONData: stores.JSONEditorStore.initJSONData,
98763
- initOnChange: stores.JSONEditorStore.initOnChange,
98764
- getJSONDataByKeyRoute:
98765
- stores.JSONEditorStore.getJSONDataByKeyRoute,
98766
- keyRoute2indexRoute: stores.JSONSchemaStore.keyRoute2indexRoute,
98767
- setDynamicDataList: stores.JSONEditorStore.setDynamicDataList,
98768
- setOptions: stores.JSONEditorStore.setOptions,
98769
- setPageScreen: stores.JSONSchemaStore.setPageScreen,
98770
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
98770
+ schemaStore: stores.JSONSchemaStore,
98771
+ jsonStore: stores.JSONEditorStore,
98771
98772
  };
98772
98773
  })(
98773
98774
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer)(
@@ -98799,155 +98800,165 @@ styles.join("\\n")
98799
98800
  /*#__PURE__*/ __webpack_require__.n(
98800
98801
  react__WEBPACK_IMPORTED_MODULE_1__,
98801
98802
  );
98802
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ =
98803
- __webpack_require__(/*! ../utils */ './src/utils/index.js');
98804
- /* harmony import */ var $renderers_ArraySchema_index__WEBPACK_IMPORTED_MODULE_3__ =
98803
+ /* harmony import */ var _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__ =
98804
+ __webpack_require__(
98805
+ /*! @wibetter/json-utils */ '../json-utils/dist/index.esm.js',
98806
+ );
98807
+ /* harmony import */ var $utils_index__WEBPACK_IMPORTED_MODULE_3__ =
98808
+ __webpack_require__(/*! $utils/index */ './src/utils/index.js');
98809
+ /* harmony import */ var $renderers_ArraySchema_index__WEBPACK_IMPORTED_MODULE_4__ =
98805
98810
  __webpack_require__(
98806
98811
  /*! $renderers/ArraySchema/index */ './src/renderers/ArraySchema/index.js',
98807
98812
  );
98808
- /* harmony import */ var $renderers_ObjectSchema_index__WEBPACK_IMPORTED_MODULE_4__ =
98813
+ /* harmony import */ var $renderers_ObjectSchema_index__WEBPACK_IMPORTED_MODULE_5__ =
98809
98814
  __webpack_require__(
98810
98815
  /*! $renderers/ObjectSchema/index */ './src/renderers/ObjectSchema/index.js',
98811
98816
  );
98812
- /* harmony import */ var $renderers_DataSourceSchema_index__WEBPACK_IMPORTED_MODULE_5__ =
98817
+ /* harmony import */ var $renderers_DataSourceSchema_index__WEBPACK_IMPORTED_MODULE_6__ =
98813
98818
  __webpack_require__(
98814
98819
  /*! $renderers/DataSourceSchema/index */ './src/renderers/DataSourceSchema/index.js',
98815
98820
  );
98816
- /* harmony import */ var $renderers_DynamicDataSchema_index__WEBPACK_IMPORTED_MODULE_6__ =
98821
+ /* harmony import */ var $renderers_DynamicDataSchema_index__WEBPACK_IMPORTED_MODULE_7__ =
98817
98822
  __webpack_require__(
98818
98823
  /*! $renderers/DynamicDataSchema/index */ './src/renderers/DynamicDataSchema/index.js',
98819
98824
  );
98820
- /* harmony import */ var $renderers_EventSchema_index__WEBPACK_IMPORTED_MODULE_7__ =
98825
+ /* harmony import */ var $renderers_EventSchema_index__WEBPACK_IMPORTED_MODULE_8__ =
98821
98826
  __webpack_require__(
98822
98827
  /*! $renderers/EventSchema/index */ './src/renderers/EventSchema/index.js',
98823
98828
  );
98824
- /* harmony import */ var $renderers_QuantitySchema_index__WEBPACK_IMPORTED_MODULE_8__ =
98829
+ /* harmony import */ var $renderers_QuantitySchema_index__WEBPACK_IMPORTED_MODULE_9__ =
98825
98830
  __webpack_require__(
98826
98831
  /*! $renderers/QuantitySchema/index */ './src/renderers/QuantitySchema/index.js',
98827
98832
  );
98828
- /* harmony import */ var $renderers_BoxStyleSchema_index__WEBPACK_IMPORTED_MODULE_9__ =
98833
+ /* harmony import */ var $renderers_BoxStyleSchema_index__WEBPACK_IMPORTED_MODULE_10__ =
98829
98834
  __webpack_require__(
98830
98835
  /*! $renderers/BoxStyleSchema/index */ './src/renderers/BoxStyleSchema/index.js',
98831
98836
  );
98832
- /* harmony import */ var $renderers_RadioSchema_index__WEBPACK_IMPORTED_MODULE_10__ =
98837
+ /* harmony import */ var $renderers_RadioSchema_index__WEBPACK_IMPORTED_MODULE_11__ =
98833
98838
  __webpack_require__(
98834
98839
  /*! $renderers/RadioSchema/index */ './src/renderers/RadioSchema/index.js',
98835
98840
  );
98836
- /* harmony import */ var $renderers_CheckboxSchema_index__WEBPACK_IMPORTED_MODULE_11__ =
98841
+ /* harmony import */ var $renderers_CheckboxSchema_index__WEBPACK_IMPORTED_MODULE_12__ =
98837
98842
  __webpack_require__(
98838
98843
  /*! $renderers/CheckboxSchema/index */ './src/renderers/CheckboxSchema/index.js',
98839
98844
  );
98840
- /* harmony import */ var $renderers_InputFormSchema_index__WEBPACK_IMPORTED_MODULE_12__ =
98845
+ /* harmony import */ var $renderers_InputFormSchema_index__WEBPACK_IMPORTED_MODULE_13__ =
98841
98846
  __webpack_require__(
98842
98847
  /*! $renderers/InputFormSchema/index */ './src/renderers/InputFormSchema/index.js',
98843
98848
  );
98844
- /* harmony import */ var $renderers_TextAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_13__ =
98849
+ /* harmony import */ var $renderers_TextAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_14__ =
98845
98850
  __webpack_require__(
98846
98851
  /*! $renderers/TextAreaFormSchema/index */ './src/renderers/TextAreaFormSchema/index.js',
98847
98852
  );
98848
- /* harmony import */ var $renderers_TextEditorSchema_index__WEBPACK_IMPORTED_MODULE_14__ =
98853
+ /* harmony import */ var $renderers_TextEditorSchema_index__WEBPACK_IMPORTED_MODULE_15__ =
98849
98854
  __webpack_require__(
98850
98855
  /*! $renderers/TextEditorSchema/index */ './src/renderers/TextEditorSchema/index.js',
98851
98856
  );
98852
- /* harmony import */ var $renderers_NumberFormSchema_index__WEBPACK_IMPORTED_MODULE_15__ =
98857
+ /* harmony import */ var $renderers_NumberFormSchema_index__WEBPACK_IMPORTED_MODULE_16__ =
98853
98858
  __webpack_require__(
98854
98859
  /*! $renderers/NumberFormSchema/index */ './src/renderers/NumberFormSchema/index.js',
98855
98860
  );
98856
- /* harmony import */ var $renderers_BooleanFormSchema_index__WEBPACK_IMPORTED_MODULE_16__ =
98861
+ /* harmony import */ var $renderers_BooleanFormSchema_index__WEBPACK_IMPORTED_MODULE_17__ =
98857
98862
  __webpack_require__(
98858
98863
  /*! $renderers/BooleanFormSchema/index */ './src/renderers/BooleanFormSchema/index.js',
98859
98864
  );
98860
- /* harmony import */ var $renderers_DateTimeFormSchema_index__WEBPACK_IMPORTED_MODULE_17__ =
98865
+ /* harmony import */ var $renderers_DateTimeFormSchema_index__WEBPACK_IMPORTED_MODULE_18__ =
98861
98866
  __webpack_require__(
98862
98867
  /*! $renderers/DateTimeFormSchema/index */ './src/renderers/DateTimeFormSchema/index.js',
98863
98868
  );
98864
- /* harmony import */ var $renderers_TimeFormSchema_index__WEBPACK_IMPORTED_MODULE_18__ =
98869
+ /* harmony import */ var $renderers_TimeFormSchema_index__WEBPACK_IMPORTED_MODULE_19__ =
98865
98870
  __webpack_require__(
98866
98871
  /*! $renderers/TimeFormSchema/index */ './src/renderers/TimeFormSchema/index.js',
98867
98872
  );
98868
- /* harmony import */ var $renderers_URLFormSchema_index__WEBPACK_IMPORTED_MODULE_19__ =
98873
+ /* harmony import */ var $renderers_URLFormSchema_index__WEBPACK_IMPORTED_MODULE_20__ =
98869
98874
  __webpack_require__(
98870
98875
  /*! $renderers/URLFormSchema/index */ './src/renderers/URLFormSchema/index.js',
98871
98876
  );
98872
- /* harmony import */ var $renderers_ColorFormSchemaV3_index__WEBPACK_IMPORTED_MODULE_20__ =
98877
+ /* harmony import */ var $renderers_ColorFormSchemaV3_index__WEBPACK_IMPORTED_MODULE_21__ =
98873
98878
  __webpack_require__(
98874
98879
  /*! $renderers/ColorFormSchemaV3/index */ './src/renderers/ColorFormSchemaV3/index.js',
98875
98880
  );
98876
- /* harmony import */ var $renderers_JsonFormSchema_index__WEBPACK_IMPORTED_MODULE_21__ =
98881
+ /* harmony import */ var $renderers_JsonFormSchema_index__WEBPACK_IMPORTED_MODULE_22__ =
98877
98882
  __webpack_require__(
98878
98883
  /*! $renderers/JsonFormSchema/index */ './src/renderers/JsonFormSchema/index.js',
98879
98884
  );
98880
- /* harmony import */ var $renderers_CodeAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_22__ =
98885
+ /* harmony import */ var $renderers_CodeAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_23__ =
98881
98886
  __webpack_require__(
98882
98887
  /*! $renderers/CodeAreaFormSchema/index */ './src/renderers/CodeAreaFormSchema/index.js',
98883
98888
  );
98884
- /* harmony import */ var $renderers_HtmlAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_23__ =
98889
+ /* harmony import */ var $renderers_HtmlAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_24__ =
98885
98890
  __webpack_require__(
98886
98891
  /*! $renderers/HtmlAreaFormSchema/index */ './src/renderers/HtmlAreaFormSchema/index.js',
98887
98892
  );
98888
- /* harmony import */ var $renderers_SelectSchema_index__WEBPACK_IMPORTED_MODULE_24__ =
98893
+ /* harmony import */ var $renderers_SelectSchema_index__WEBPACK_IMPORTED_MODULE_25__ =
98889
98894
  __webpack_require__(
98890
98895
  /*! $renderers/SelectSchema/index */ './src/renderers/SelectSchema/index.js',
98891
98896
  );
98892
- /* harmony import */ var $renderers_InputImageSchema_index__WEBPACK_IMPORTED_MODULE_25__ =
98897
+ /* harmony import */ var $renderers_InputImageSchema_index__WEBPACK_IMPORTED_MODULE_26__ =
98893
98898
  __webpack_require__(
98894
98899
  /*! $renderers/InputImageSchema/index */ './src/renderers/InputImageSchema/index.js',
98895
98900
  );
98896
- /* harmony import */ var $renderers_DynamicConfigSchema_index__WEBPACK_IMPORTED_MODULE_26__ =
98901
+ /* harmony import */ var $renderers_DynamicConfigSchema_index__WEBPACK_IMPORTED_MODULE_27__ =
98897
98902
  __webpack_require__(
98898
98903
  /*! $renderers/DynamicConfigSchema/index */ './src/renderers/DynamicConfigSchema/index.js',
98899
98904
  );
98900
- /* harmony import */ var $renderers_SohuDataSourceSchema_index__WEBPACK_IMPORTED_MODULE_27__ =
98905
+ /* harmony import */ var $renderers_SohuDataSourceSchema_index__WEBPACK_IMPORTED_MODULE_28__ =
98901
98906
  __webpack_require__(
98902
98907
  /*! $renderers/SohuDataSourceSchema/index */ './src/renderers/SohuDataSourceSchema/index.js',
98903
98908
  );
98904
- /* harmony import */ var $renderers_SohuEventSchema_index__WEBPACK_IMPORTED_MODULE_28__ =
98909
+ /* harmony import */ var $renderers_SohuEventSchema_index__WEBPACK_IMPORTED_MODULE_29__ =
98905
98910
  __webpack_require__(
98906
98911
  /*! $renderers/SohuEventSchema/index */ './src/renderers/SohuEventSchema/index.js',
98907
98912
  );
98908
98913
 
98914
+ // import {omit} from 'lodash';
98915
+
98909
98916
  /** 根据当前类型选择对应的组件进行渲染 */
98910
98917
  var MappingRender = function MappingRender(props) {
98918
+ var _ref = props.schemaStore || {},
98919
+ getSchemaByKeyRoute = _ref.getSchemaByKeyRoute;
98920
+ var _ref2 = props.jsonStore || {},
98921
+ getJSONDataByKeyRoute = _ref2.getJSONDataByKeyRoute;
98911
98922
  var nodeKey = props.nodeKey,
98912
98923
  jsonKey = props.jsonKey,
98913
98924
  keyRoute = props.keyRoute,
98914
- targetJsonSchema = props.targetJsonSchema,
98915
- getJSONDataByKeyRoute = props.getJSONDataByKeyRoute,
98916
- keyRoute2indexRoute = props.keyRoute2indexRoute,
98917
- updateFormValueData = props.updateFormValueData;
98925
+ targetJsonSchema = props.targetJsonSchema;
98918
98926
  var curType = targetJsonSchema.type;
98919
-
98920
- // 获取当前字段的条件规则
98921
- var hiddenRule = {};
98922
- if (targetJsonSchema.hiddenRule) {
98923
- hiddenRule = targetJsonSchema.hiddenRule;
98924
- }
98925
- var curConditionValue = '';
98926
98927
  var curNodeKey = nodeKey;
98927
98928
 
98928
- // 隐藏条件成立则直接返回
98929
+ // 支持显隐属性表达式
98930
+ var parentKeyRoute = (0,
98931
+ _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.getParentKeyRoute)(
98932
+ keyRoute,
98933
+ );
98934
+ var parentData = getJSONDataByKeyRoute(parentKeyRoute) || {}; // 获取当前父级数据域
98929
98935
  if (
98930
- hiddenRule.conditionProp &&
98931
- (0, _utils__WEBPACK_IMPORTED_MODULE_2__.hasProperties)(
98932
- hiddenRule.conditionValue,
98933
- )
98936
+ ((0, _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isBoolean)(
98937
+ targetJsonSchema.onShow,
98938
+ ) &&
98939
+ !targetJsonSchema.onShow) ||
98940
+ ((0, _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isString)(
98941
+ targetJsonSchema.onShow,
98942
+ ) &&
98943
+ !(0,
98944
+ _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.expressionOn)(
98945
+ targetJsonSchema.onShow,
98946
+ parentData,
98947
+ ))
98934
98948
  ) {
98935
- var curConditionProp = hiddenRule.conditionProp;
98936
- var needConditionValue = hiddenRule.conditionValue; // 条件字段成立的条件值
98937
- var curConditionKeyRoute = curConditionProp.keyRoute; // 条件字段的key值
98938
-
98939
- // 获取条件字段的数值
98940
- curConditionValue = getJSONDataByKeyRoute(curConditionKeyRoute);
98941
- if (needConditionValue === curConditionValue) {
98942
- if (targetJsonSchema.clearValueOnHidden) {
98943
- // 删除掉隐藏的表单项数值
98944
- updateFormValueData(keyRoute, undefined);
98945
- }
98946
- return;
98947
- }
98949
+ return;
98948
98950
  }
98949
- // 将条件字段的数值作为key的一部分
98950
- curNodeKey = nodeKey + '-' + curConditionValue;
98951
+
98952
+ // 收集当前所有条件子字段
98953
+ /*
98954
+ const curData = getJSONDataByKeyRoute(keyRoute) || {};
98955
+ const curConditionValue = schema2conditionValue(targetJsonSchema, curData);
98956
+ // 将条件字段的数值作为key的一部分
98957
+ if (curConditionValue) {
98958
+ curNodeKey = `${nodeKey}-${curConditionValue}`;
98959
+ }
98960
+ */
98961
+
98951
98962
  var newProps = (0,
98952
98963
  _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
98953
98964
  'default'
@@ -98957,329 +98968,194 @@ styles.join("\\n")
98957
98968
  switch (curType) {
98958
98969
  case 'object':
98959
98970
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
98960
- $renderers_ObjectSchema_index__WEBPACK_IMPORTED_MODULE_4__[
98971
+ $renderers_ObjectSchema_index__WEBPACK_IMPORTED_MODULE_5__[
98961
98972
  'default'
98962
98973
  ],
98963
- (0,
98964
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
98965
- 'default'
98966
- ])({}, newProps, {
98967
- key: curNodeKey,
98968
- }),
98974
+ newProps,
98969
98975
  );
98970
98976
  case 'dynamic-config':
98971
98977
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
98972
- $renderers_DynamicConfigSchema_index__WEBPACK_IMPORTED_MODULE_26__[
98978
+ $renderers_DynamicConfigSchema_index__WEBPACK_IMPORTED_MODULE_27__[
98973
98979
  'default'
98974
98980
  ],
98975
- (0,
98976
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
98977
- 'default'
98978
- ])({}, newProps, {
98979
- key: curNodeKey,
98980
- }),
98981
+ newProps,
98981
98982
  );
98982
98983
  case 'sohu-source':
98983
98984
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
98984
- $renderers_SohuDataSourceSchema_index__WEBPACK_IMPORTED_MODULE_27__[
98985
+ $renderers_SohuDataSourceSchema_index__WEBPACK_IMPORTED_MODULE_28__[
98985
98986
  'default'
98986
98987
  ],
98987
- (0,
98988
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
98989
- 'default'
98990
- ])({}, newProps, {
98991
- key: curNodeKey,
98992
- }),
98988
+ newProps,
98993
98989
  );
98994
98990
  case 'sohu-event':
98995
98991
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
98996
- $renderers_SohuEventSchema_index__WEBPACK_IMPORTED_MODULE_28__[
98992
+ $renderers_SohuEventSchema_index__WEBPACK_IMPORTED_MODULE_29__[
98997
98993
  'default'
98998
98994
  ],
98999
- (0,
99000
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99001
- 'default'
99002
- ])({}, newProps, {
99003
- key: curNodeKey,
99004
- }),
98995
+ newProps,
99005
98996
  );
99006
98997
  case 'array':
99007
98998
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99008
- $renderers_ArraySchema_index__WEBPACK_IMPORTED_MODULE_3__[
98999
+ $renderers_ArraySchema_index__WEBPACK_IMPORTED_MODULE_4__[
99009
99000
  'default'
99010
99001
  ],
99011
- (0,
99012
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99013
- 'default'
99014
- ])({}, newProps, {
99015
- key: curNodeKey,
99016
- }),
99002
+ newProps,
99017
99003
  );
99018
99004
  case 'dynamic-data':
99019
99005
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99020
- $renderers_DynamicDataSchema_index__WEBPACK_IMPORTED_MODULE_6__[
99006
+ $renderers_DynamicDataSchema_index__WEBPACK_IMPORTED_MODULE_7__[
99021
99007
  'default'
99022
99008
  ],
99023
- (0,
99024
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99025
- 'default'
99026
- ])({}, newProps, {
99027
- key: curNodeKey,
99028
- }),
99009
+ newProps,
99029
99010
  );
99030
99011
  case 'datasource':
99031
99012
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99032
- $renderers_DataSourceSchema_index__WEBPACK_IMPORTED_MODULE_5__[
99013
+ $renderers_DataSourceSchema_index__WEBPACK_IMPORTED_MODULE_6__[
99033
99014
  'default'
99034
99015
  ],
99035
- (0,
99036
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99037
- 'default'
99038
- ])({}, newProps, {
99039
- key: curNodeKey,
99040
- }),
99016
+ newProps,
99041
99017
  );
99042
99018
  case 'event':
99043
99019
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99044
- $renderers_EventSchema_index__WEBPACK_IMPORTED_MODULE_7__[
99020
+ $renderers_EventSchema_index__WEBPACK_IMPORTED_MODULE_8__[
99045
99021
  'default'
99046
99022
  ],
99047
- (0,
99048
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99049
- 'default'
99050
- ])({}, newProps, {
99051
- key: curNodeKey,
99052
- }),
99023
+ newProps,
99053
99024
  );
99054
99025
  case 'quantity':
99055
99026
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99056
- $renderers_QuantitySchema_index__WEBPACK_IMPORTED_MODULE_8__[
99027
+ $renderers_QuantitySchema_index__WEBPACK_IMPORTED_MODULE_9__[
99057
99028
  'default'
99058
99029
  ],
99059
- (0,
99060
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99061
- 'default'
99062
- ])({}, newProps, {
99063
- key: curNodeKey,
99064
- }),
99030
+ newProps,
99065
99031
  );
99066
99032
  case 'box-style':
99067
99033
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99068
- $renderers_BoxStyleSchema_index__WEBPACK_IMPORTED_MODULE_9__[
99034
+ $renderers_BoxStyleSchema_index__WEBPACK_IMPORTED_MODULE_10__[
99069
99035
  'default'
99070
99036
  ],
99071
- (0,
99072
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99073
- 'default'
99074
- ])({}, newProps, {
99075
- key: curNodeKey,
99076
- }),
99037
+ newProps,
99077
99038
  );
99078
99039
  case 'radio':
99079
99040
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99080
- $renderers_RadioSchema_index__WEBPACK_IMPORTED_MODULE_10__[
99041
+ $renderers_RadioSchema_index__WEBPACK_IMPORTED_MODULE_11__[
99081
99042
  'default'
99082
99043
  ],
99083
- (0,
99084
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99085
- 'default'
99086
- ])({}, newProps, {
99087
- key: curNodeKey,
99088
- }),
99044
+ newProps,
99089
99045
  );
99090
99046
  case 'select':
99091
99047
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99092
- $renderers_SelectSchema_index__WEBPACK_IMPORTED_MODULE_24__[
99048
+ $renderers_SelectSchema_index__WEBPACK_IMPORTED_MODULE_25__[
99093
99049
  'default'
99094
99050
  ],
99095
- (0,
99096
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99097
- 'default'
99098
- ])({}, newProps, {
99099
- key: curNodeKey,
99100
- }),
99051
+ newProps,
99101
99052
  );
99102
99053
  case 'checkboxes':
99103
99054
  // 多选
99104
99055
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99105
- $renderers_CheckboxSchema_index__WEBPACK_IMPORTED_MODULE_11__[
99056
+ $renderers_CheckboxSchema_index__WEBPACK_IMPORTED_MODULE_12__[
99106
99057
  'default'
99107
99058
  ],
99108
- (0,
99109
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99110
- 'default'
99111
- ])({}, newProps, {
99112
- key: curNodeKey,
99113
- }),
99059
+ newProps,
99114
99060
  );
99115
99061
  case 'input':
99116
99062
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99117
- $renderers_InputFormSchema_index__WEBPACK_IMPORTED_MODULE_12__[
99063
+ $renderers_InputFormSchema_index__WEBPACK_IMPORTED_MODULE_13__[
99118
99064
  'default'
99119
99065
  ],
99120
- (0,
99121
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99122
- 'default'
99123
- ])({}, newProps, {
99124
- key: curNodeKey,
99125
- }),
99066
+ newProps,
99126
99067
  );
99127
99068
  case 'textarea':
99128
99069
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99129
- $renderers_TextAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_13__[
99070
+ $renderers_TextAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_14__[
99130
99071
  'default'
99131
99072
  ],
99132
- (0,
99133
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99134
- 'default'
99135
- ])({}, newProps, {
99136
- key: curNodeKey,
99137
- }),
99073
+ newProps,
99138
99074
  );
99139
99075
  case 'text-editor':
99140
99076
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99141
- $renderers_TextEditorSchema_index__WEBPACK_IMPORTED_MODULE_14__[
99077
+ $renderers_TextEditorSchema_index__WEBPACK_IMPORTED_MODULE_15__[
99142
99078
  'default'
99143
99079
  ],
99144
- (0,
99145
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99146
- 'default'
99147
- ])({}, newProps, {
99148
- key: curNodeKey,
99149
- }),
99080
+ newProps,
99150
99081
  );
99151
99082
  case 'number':
99152
99083
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99153
- $renderers_NumberFormSchema_index__WEBPACK_IMPORTED_MODULE_15__[
99084
+ $renderers_NumberFormSchema_index__WEBPACK_IMPORTED_MODULE_16__[
99154
99085
  'default'
99155
99086
  ],
99156
- (0,
99157
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99158
- 'default'
99159
- ])({}, newProps, {
99160
- key: curNodeKey,
99161
- }),
99087
+ newProps,
99162
99088
  );
99163
99089
  case 'boolean':
99164
99090
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99165
- $renderers_BooleanFormSchema_index__WEBPACK_IMPORTED_MODULE_16__[
99091
+ $renderers_BooleanFormSchema_index__WEBPACK_IMPORTED_MODULE_17__[
99166
99092
  'default'
99167
99093
  ],
99168
- (0,
99169
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99170
- 'default'
99171
- ])({}, newProps, {
99172
- key: curNodeKey,
99173
- }),
99094
+ newProps,
99174
99095
  );
99175
99096
  case 'date':
99176
99097
  case 'date-time':
99177
99098
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99178
- $renderers_DateTimeFormSchema_index__WEBPACK_IMPORTED_MODULE_17__[
99099
+ $renderers_DateTimeFormSchema_index__WEBPACK_IMPORTED_MODULE_18__[
99179
99100
  'default'
99180
99101
  ],
99181
- (0,
99182
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99183
- 'default'
99184
- ])({}, newProps, {
99185
- key: curNodeKey,
99186
- }),
99102
+ newProps,
99187
99103
  );
99188
99104
  case 'time':
99189
99105
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99190
- $renderers_TimeFormSchema_index__WEBPACK_IMPORTED_MODULE_18__[
99106
+ $renderers_TimeFormSchema_index__WEBPACK_IMPORTED_MODULE_19__[
99191
99107
  'default'
99192
99108
  ],
99193
- (0,
99194
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99195
- 'default'
99196
- ])({}, newProps, {
99197
- key: curNodeKey,
99198
- }),
99109
+ newProps,
99199
99110
  );
99200
99111
  case 'url':
99201
99112
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99202
- $renderers_URLFormSchema_index__WEBPACK_IMPORTED_MODULE_19__[
99113
+ $renderers_URLFormSchema_index__WEBPACK_IMPORTED_MODULE_20__[
99203
99114
  'default'
99204
99115
  ],
99205
- (0,
99206
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99207
- 'default'
99208
- ])({}, newProps, {
99209
- key: curNodeKey,
99210
- }),
99116
+ newProps,
99211
99117
  );
99212
99118
  case 'color':
99213
99119
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99214
- $renderers_ColorFormSchemaV3_index__WEBPACK_IMPORTED_MODULE_20__[
99120
+ $renderers_ColorFormSchemaV3_index__WEBPACK_IMPORTED_MODULE_21__[
99215
99121
  'default'
99216
99122
  ],
99217
- (0,
99218
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99219
- 'default'
99220
- ])({}, newProps, {
99221
- key: curNodeKey,
99222
- }),
99123
+ newProps,
99223
99124
  );
99224
99125
  case 'input-image':
99225
99126
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99226
- $renderers_InputImageSchema_index__WEBPACK_IMPORTED_MODULE_25__[
99127
+ $renderers_InputImageSchema_index__WEBPACK_IMPORTED_MODULE_26__[
99227
99128
  'default'
99228
99129
  ],
99229
- (0,
99230
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99231
- 'default'
99232
- ])({}, newProps, {
99233
- key: curNodeKey,
99234
- }),
99130
+ newProps,
99235
99131
  );
99236
99132
  case 'json':
99237
99133
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99238
- $renderers_JsonFormSchema_index__WEBPACK_IMPORTED_MODULE_21__[
99134
+ $renderers_JsonFormSchema_index__WEBPACK_IMPORTED_MODULE_22__[
99239
99135
  'default'
99240
99136
  ],
99241
- (0,
99242
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99243
- 'default'
99244
- ])({}, newProps, {
99245
- key: curNodeKey,
99246
- }),
99137
+ newProps,
99247
99138
  );
99248
99139
  case 'codearea':
99249
99140
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99250
- $renderers_CodeAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_22__[
99141
+ $renderers_CodeAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_23__[
99251
99142
  'default'
99252
99143
  ],
99253
- (0,
99254
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99255
- 'default'
99256
- ])({}, newProps, {
99257
- key: curNodeKey,
99258
- }),
99144
+ newProps,
99259
99145
  );
99260
99146
  case 'htmlarea':
99261
99147
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99262
- $renderers_HtmlAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_23__[
99148
+ $renderers_HtmlAreaFormSchema_index__WEBPACK_IMPORTED_MODULE_24__[
99263
99149
  'default'
99264
99150
  ],
99265
- (0,
99266
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99267
- 'default'
99268
- ])({}, newProps, {
99269
- key: curNodeKey,
99270
- }),
99151
+ newProps,
99271
99152
  );
99272
99153
  default:
99273
99154
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
99274
- $renderers_InputFormSchema_index__WEBPACK_IMPORTED_MODULE_12__[
99155
+ $renderers_InputFormSchema_index__WEBPACK_IMPORTED_MODULE_13__[
99275
99156
  'default'
99276
99157
  ],
99277
- (0,
99278
- _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[
99279
- 'default'
99280
- ])({}, newProps, {
99281
- key: curNodeKey,
99282
- }),
99158
+ newProps,
99283
99159
  );
99284
99160
  }
99285
99161
  };
@@ -99315,11 +99191,11 @@ styles.join("\\n")
99315
99191
  * getJSONDataByKeyRoute、getInitJsonDataByKeyRoute
99316
99192
  * */
99317
99193
  function catchJsonDataByWebCache(curKeyRoute) {
99318
- var _this$props = this.props,
99319
- targetJsonSchema = _this$props.targetJsonSchema,
99320
- getJSONDataByKeyRoute = _this$props.getJSONDataByKeyRoute,
99321
- getInitJsonDataByKeyRoute = _this$props.getInitJsonDataByKeyRoute,
99322
- updateFormValueData = _this$props.updateFormValueData;
99194
+ var targetJsonSchema = this.props.targetJsonSchema;
99195
+ var _ref = this.props.jsonStore || {},
99196
+ getJSONDataByKeyRoute = _ref.getJSONDataByKeyRoute,
99197
+ getInitJsonDataByKeyRoute = _ref.getInitJsonDataByKeyRoute,
99198
+ updateFormValueData = _ref.updateFormValueData;
99323
99199
  var curType = targetJsonSchema.type;
99324
99200
  var keyRoute = curKeyRoute || this.props.keyRoute;
99325
99201
  var backUpKeyRoute = (0,
@@ -99462,6 +99338,8 @@ styles.join("\\n")
99462
99338
  _this = _React$PureComponent.call(this, props) || this;
99463
99339
  /** 添加数组项 */
99464
99340
  _this.addArrayItem = function (keyRoute, curArr, curArrIndex) {
99341
+ var _ref = _this.props.jsonStore || {},
99342
+ addArrayItem = _ref.addArrayItem;
99465
99343
  var maximumChild =
99466
99344
  _this.props.targetJsonSchema['maximum-child'];
99467
99345
  if (curArr && maximumChild && curArr.length >= maximumChild) {
@@ -99471,11 +99349,13 @@ styles.join("\\n")
99471
99349
  '\u4E2A\u5B50\u9879',
99472
99350
  );
99473
99351
  } else {
99474
- _this.props.addArrayItem(keyRoute, curArrIndex);
99352
+ addArrayItem(keyRoute, curArrIndex);
99475
99353
  }
99476
99354
  };
99477
99355
  /** 删除数组项 */
99478
99356
  _this.deleteArrItem = function (keyRoute, arrIndex, curArr) {
99357
+ var _ref2 = _this.props.jsonStore || {},
99358
+ deleteArrayIndex = _ref2.deleteArrayIndex;
99479
99359
  var minimumChild =
99480
99360
  _this.props.targetJsonSchema['minimum-child'];
99481
99361
  if (curArr && minimumChild && curArr.length <= minimumChild) {
@@ -99485,7 +99365,7 @@ styles.join("\\n")
99485
99365
  '\u4E2A\u5B50\u9879',
99486
99366
  );
99487
99367
  } else {
99488
- _this.props.deleteArrayIndex(keyRoute, arrIndex);
99368
+ deleteArrayIndex(keyRoute, arrIndex);
99489
99369
  }
99490
99370
  };
99491
99371
  /**
@@ -99598,15 +99478,20 @@ styles.join("\\n")
99598
99478
  var _targetJsonSchema$sho,
99599
99479
  _this2 = this;
99600
99480
  var _this$props = this.props,
99601
- keyRoute = _this$props.keyRoute,
99602
- jsonKey = _this$props.jsonKey,
99603
- nodeKey = _this$props.nodeKey,
99604
- pageScreen = _this$props.pageScreen,
99605
- indexRoute = _this$props.indexRoute,
99606
- targetJsonSchema = _this$props.targetJsonSchema,
99607
- getJSONDataByKeyRoute = _this$props.getJSONDataByKeyRoute,
99608
- keyRoute2indexRoute = _this$props.keyRoute2indexRoute,
99609
- updateFormValueData = _this$props.updateFormValueData;
99481
+ schemaStore = _this$props.schemaStore,
99482
+ jsonStore = _this$props.jsonStore;
99483
+ var _ref3 = schemaStore || {},
99484
+ pageScreen = _ref3.pageScreen;
99485
+ var _ref4 = jsonStore || {},
99486
+ getJSONDataByKeyRoute = _ref4.getJSONDataByKeyRoute,
99487
+ sortArrayItem = _ref4.sortArrayItem,
99488
+ triggerChange = _ref4.triggerChange;
99489
+ var _this$props2 = this.props,
99490
+ keyRoute = _this$props2.keyRoute,
99491
+ jsonKey = _this$props2.jsonKey,
99492
+ nodeKey = _this$props2.nodeKey,
99493
+ indexRoute = _this$props2.indexRoute,
99494
+ targetJsonSchema = _this$props2.targetJsonSchema;
99610
99495
  var _this$state = this.state,
99611
99496
  jsonView = _this$state.jsonView,
99612
99497
  isClosed = _this$state.isClosed,
@@ -99630,7 +99515,7 @@ styles.join("\\n")
99630
99515
  pageScreen === 'wideScreen'
99631
99516
  ? 'wide-screen-element-warp'
99632
99517
  : 'mobile-screen-element-warp',
99633
- key: nodeKey,
99518
+ key: nodeKey + '-' + triggerChange,
99634
99519
  id: nodeKey,
99635
99520
  },
99636
99521
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1__.createElement(
@@ -99943,11 +99828,7 @@ styles.join("\\n")
99943
99828
  {
99944
99829
  className: 'array-operate-btn',
99945
99830
  onClick: function onClick(event) {
99946
- _this2.props.sortArrayItem(
99947
- keyRoute,
99948
- arrIndex,
99949
- 'up',
99950
- );
99831
+ sortArrayItem(keyRoute, arrIndex, 'up');
99951
99832
  event.preventDefault();
99952
99833
  event.stopPropagation();
99953
99834
  },
@@ -99967,7 +99848,7 @@ styles.join("\\n")
99967
99848
  {
99968
99849
  className: 'array-operate-btn',
99969
99850
  onClick: function onClick(event) {
99970
- _this2.props.sortArrayItem(
99851
+ sortArrayItem(
99971
99852
  keyRoute,
99972
99853
  arrIndex,
99973
99854
  'down',
@@ -100004,9 +99885,8 @@ styles.join("\\n")
100004
99885
  targetJsonSchema: arrayItemsDataObj,
100005
99886
  isArrayItem: true,
100006
99887
  arrIndex: arrIndex,
100007
- getJSONDataByKeyRoute: getJSONDataByKeyRoute,
100008
- keyRoute2indexRoute: keyRoute2indexRoute,
100009
- updateFormValueData: updateFormValueData,
99888
+ schemaStore: schemaStore,
99889
+ jsonStore: jsonStore,
100010
99890
  },
100011
99891
  ),
100012
99892
  ),
@@ -100039,17 +99919,8 @@ styles.join("\\n")
100039
99919
  /* harmony default export */ __webpack_exports__['default'] = (0,
100040
99920
  mobx_react__WEBPACK_IMPORTED_MODULE_20__.inject)(function (stores) {
100041
99921
  return {
100042
- triggerChange: stores.JSONEditorStore.triggerChange,
100043
- pageScreen: stores.JSONSchemaStore.pageScreen,
100044
- indexRoute2keyRoute: stores.JSONSchemaStore.indexRoute2keyRoute,
100045
- getJSONDataByKeyRoute:
100046
- stores.JSONEditorStore.getJSONDataByKeyRoute,
100047
- getInitJsonDataByKeyRoute:
100048
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
100049
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
100050
- deleteArrayIndex: stores.JSONEditorStore.deleteArrayIndex,
100051
- addArrayItem: stores.JSONEditorStore.addArrayItem,
100052
- sortArrayItem: stores.JSONEditorStore.sortArrayItem,
99922
+ schemaStore: stores.JSONSchemaStore,
99923
+ jsonStore: stores.JSONEditorStore,
100053
99924
  };
100054
99925
  })(
100055
99926
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_20__.observer)(ArraySchema),
@@ -100119,7 +99990,9 @@ styles.join("\\n")
100119
99990
  _this.handleValueChange = function (checked) {
100120
99991
  var _this$props = _this.props,
100121
99992
  keyRoute = _this$props.keyRoute,
100122
- updateFormValueData = _this$props.updateFormValueData;
99993
+ jsonStore = _this$props.jsonStore;
99994
+ var _ref = jsonStore || {},
99995
+ updateFormValueData = _ref.updateFormValueData;
100123
99996
  updateFormValueData(keyRoute, checked); // 更新数值
100124
99997
  };
100125
99998
  _this.handleValueChange = _this.handleValueChange.bind(_this);
@@ -100148,12 +100021,17 @@ styles.join("\\n")
100148
100021
  };
100149
100022
  _proto.render = function render() {
100150
100023
  var _this$props2 = this.props,
100151
- keyRoute = _this$props2.keyRoute,
100152
- jsonKey = _this$props2.jsonKey,
100153
- nodeKey = _this$props2.nodeKey,
100154
- targetJsonSchema = _this$props2.targetJsonSchema,
100155
- pageScreen = _this$props2.pageScreen,
100156
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
100024
+ schemaStore = _this$props2.schemaStore,
100025
+ jsonStore = _this$props2.jsonStore;
100026
+ var _ref2 = schemaStore || {},
100027
+ pageScreen = _ref2.pageScreen;
100028
+ var _ref3 = jsonStore || {},
100029
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
100030
+ var _this$props3 = this.props,
100031
+ keyRoute = _this$props3.keyRoute,
100032
+ jsonKey = _this$props3.jsonKey,
100033
+ nodeKey = _this$props3.nodeKey,
100034
+ targetJsonSchema = _this$props3.targetJsonSchema;
100157
100035
  // 从jsonData中获取对应的数值
100158
100036
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
100159
100037
  var isNeedTwoCol = (0,
@@ -100257,12 +100135,8 @@ styles.join("\\n")
100257
100135
  /* harmony default export */ __webpack_exports__['default'] = (0,
100258
100136
  mobx_react__WEBPACK_IMPORTED_MODULE_8__.inject)(function (stores) {
100259
100137
  return {
100260
- pageScreen: stores.JSONSchemaStore.pageScreen,
100261
- getJSONDataByKeyRoute:
100262
- stores.JSONEditorStore.getJSONDataByKeyRoute,
100263
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
100264
- getInitJsonDataByKeyRoute:
100265
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
100138
+ schemaStore: stores.JSONSchemaStore,
100139
+ jsonStore: stores.JSONEditorStore,
100266
100140
  };
100267
100141
  })(
100268
100142
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(
@@ -100341,10 +100215,12 @@ styles.join("\\n")
100341
100215
  };
100342
100216
  /** 初始化boxStyle的数值 */
100343
100217
  _this.initBoxStyle = function () {
100218
+ var jsonStore = _this.props.jsonStore;
100219
+ var _ref = jsonStore || {},
100220
+ getJSONDataByKeyRoute = _ref.getJSONDataByKeyRoute;
100344
100221
  var _this$props = _this.props,
100345
100222
  keyRoute = _this$props.keyRoute,
100346
- targetJsonSchema = _this$props.targetJsonSchema,
100347
- getJSONDataByKeyRoute = _this$props.getJSONDataByKeyRoute;
100223
+ targetJsonSchema = _this$props.targetJsonSchema;
100348
100224
  // 从jsonData中获取对应的数值
100349
100225
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
100350
100226
  /** 获取quantity中的数值对象(默认第一个就是数值对象) */
@@ -100464,7 +100340,9 @@ styles.join("\\n")
100464
100340
  _this.updateBoxStyleState = function () {
100465
100341
  var _this$props2 = _this.props,
100466
100342
  keyRoute = _this$props2.keyRoute,
100467
- updateFormValueData = _this$props2.updateFormValueData;
100343
+ jsonStore = _this$props2.jsonStore;
100344
+ var _ref2 = jsonStore || {},
100345
+ updateFormValueData = _ref2.updateFormValueData;
100468
100346
  var renderAction = _this.state.renderAction;
100469
100347
  /** 获取布局容器的盒子模型数值 */
100470
100348
  var boxStyleUnit =
@@ -100508,8 +100386,12 @@ styles.join("\\n")
100508
100386
  var _this$props3 = this.props,
100509
100387
  nodeKey = _this$props3.nodeKey,
100510
100388
  jsonKey = _this$props3.jsonKey,
100511
- targetJsonSchema = _this$props3.targetJsonSchema,
100512
- pageScreen = _this$props3.pageScreen;
100389
+ targetJsonSchema = _this$props3.targetJsonSchema;
100390
+ var _this$props4 = this.props,
100391
+ schemaStore = _this$props4.schemaStore,
100392
+ jsonStore = _this$props4.jsonStore;
100393
+ var _ref3 = schemaStore || {},
100394
+ pageScreen = _ref3.pageScreen;
100513
100395
  var _this$state = this.state,
100514
100396
  renderAction = _this$state.renderAction,
100515
100397
  layoutStyleLock = _this$state.layoutStyleLock;
@@ -100742,12 +100624,8 @@ styles.join("\\n")
100742
100624
  /* harmony default export */ __webpack_exports__['default'] = (0,
100743
100625
  mobx_react__WEBPACK_IMPORTED_MODULE_7__.inject)(function (stores) {
100744
100626
  return {
100745
- pageScreen: stores.JSONSchemaStore.pageScreen,
100746
- getJSONDataByKeyRoute:
100747
- stores.JSONEditorStore.getJSONDataByKeyRoute,
100748
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
100749
- getInitJsonDataByKeyRoute:
100750
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
100627
+ schemaStore: stores.JSONSchemaStore,
100628
+ jsonStore: stores.JSONEditorStore,
100751
100629
  };
100752
100630
  })(
100753
100631
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_7__.observer)(
@@ -100819,7 +100697,9 @@ styles.join("\\n")
100819
100697
  _this.handleValueChange = function (checkedValue) {
100820
100698
  var _this$props = _this.props,
100821
100699
  keyRoute = _this$props.keyRoute,
100822
- updateFormValueData = _this$props.updateFormValueData;
100700
+ jsonStore = _this$props.jsonStore;
100701
+ var _ref = jsonStore || {},
100702
+ updateFormValueData = _ref.updateFormValueData;
100823
100703
  updateFormValueData(keyRoute, checkedValue); // 更新数值
100824
100704
  };
100825
100705
  _this.handleValueChange = _this.handleValueChange.bind(_this);
@@ -100848,12 +100728,17 @@ styles.join("\\n")
100848
100728
  };
100849
100729
  _proto.render = function render() {
100850
100730
  var _this$props2 = this.props,
100851
- nodeKey = _this$props2.nodeKey,
100852
- jsonKey = _this$props2.jsonKey,
100853
- keyRoute = _this$props2.keyRoute,
100854
- targetJsonSchema = _this$props2.targetJsonSchema,
100855
- pageScreen = _this$props2.pageScreen,
100856
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
100731
+ schemaStore = _this$props2.schemaStore,
100732
+ jsonStore = _this$props2.jsonStore;
100733
+ var _ref2 = schemaStore || {},
100734
+ pageScreen = _ref2.pageScreen;
100735
+ var _ref3 = jsonStore || {},
100736
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
100737
+ var _this$props3 = this.props,
100738
+ nodeKey = _this$props3.nodeKey,
100739
+ jsonKey = _this$props3.jsonKey,
100740
+ keyRoute = _this$props3.keyRoute,
100741
+ targetJsonSchema = _this$props3.targetJsonSchema;
100857
100742
  // 从jsonData中获取对应的数值
100858
100743
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
100859
100744
  var options = targetJsonSchema.options;
@@ -100982,12 +100867,8 @@ styles.join("\\n")
100982
100867
  /* harmony default export */ __webpack_exports__['default'] = (0,
100983
100868
  mobx_react__WEBPACK_IMPORTED_MODULE_8__.inject)(function (stores) {
100984
100869
  return {
100985
- pageScreen: stores.JSONSchemaStore.pageScreen,
100986
- getJSONDataByKeyRoute:
100987
- stores.JSONEditorStore.getJSONDataByKeyRoute,
100988
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
100989
- getInitJsonDataByKeyRoute:
100990
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
100870
+ schemaStore: stores.JSONSchemaStore,
100871
+ jsonStore: stores.JSONEditorStore,
100991
100872
  };
100992
100873
  })(
100993
100874
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(
@@ -101079,7 +100960,9 @@ styles.join("\\n")
101079
100960
  _this.handleValueChange = function (newJsonData) {
101080
100961
  var _this$props = _this.props,
101081
100962
  keyRoute = _this$props.keyRoute,
101082
- updateFormValueData = _this$props.updateFormValueData;
100963
+ jsonStore = _this$props.jsonStore;
100964
+ var _ref = jsonStore || {},
100965
+ updateFormValueData = _ref.updateFormValueData;
101083
100966
  updateFormValueData(keyRoute, newJsonData); // 更新数值
101084
100967
  };
101085
100968
  _this.state = {
@@ -101115,14 +100998,19 @@ styles.join("\\n")
101115
100998
  _proto.render = function render() {
101116
100999
  var _this2 = this;
101117
101000
  var _this$props2 = this.props,
101118
- isReadOnly = _this$props2.isReadOnly,
101119
- jsonKey = _this$props2.jsonKey,
101120
- isIgnoreWarn = _this$props2.isIgnoreWarn,
101121
- nodeKey = _this$props2.nodeKey,
101122
- keyRoute = _this$props2.keyRoute,
101123
- targetJsonSchema = _this$props2.targetJsonSchema,
101124
- pageScreen = _this$props2.pageScreen,
101125
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
101001
+ schemaStore = _this$props2.schemaStore,
101002
+ jsonStore = _this$props2.jsonStore;
101003
+ var _ref2 = schemaStore || {},
101004
+ pageScreen = _ref2.pageScreen;
101005
+ var _ref3 = jsonStore || {},
101006
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
101007
+ var _this$props3 = this.props,
101008
+ isReadOnly = _this$props3.isReadOnly,
101009
+ jsonKey = _this$props3.jsonKey,
101010
+ isIgnoreWarn = _this$props3.isIgnoreWarn,
101011
+ nodeKey = _this$props3.nodeKey,
101012
+ keyRoute = _this$props3.keyRoute,
101013
+ targetJsonSchema = _this$props3.targetJsonSchema;
101126
101014
  var _this$state = this.state,
101127
101015
  isShowWarn = _this$state.isShowWarn,
101128
101016
  warnText = _this$state.warnText;
@@ -101312,12 +101200,8 @@ styles.join("\\n")
101312
101200
  /* harmony default export */ __webpack_exports__['default'] = (0,
101313
101201
  mobx_react__WEBPACK_IMPORTED_MODULE_11__.inject)(function (stores) {
101314
101202
  return {
101315
- pageScreen: stores.JSONSchemaStore.pageScreen,
101316
- getJSONDataByKeyRoute:
101317
- stores.JSONEditorStore.getJSONDataByKeyRoute,
101318
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
101319
- getInitJsonDataByKeyRoute:
101320
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
101203
+ schemaStore: stores.JSONSchemaStore,
101204
+ jsonStore: stores.JSONEditorStore,
101321
101205
  };
101322
101206
  })(
101323
101207
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_11__.observer)(
@@ -101407,6 +101291,11 @@ styles.join("\\n")
101407
101291
  _this = _React$PureComponent.call(this, props) || this;
101408
101292
  /** 数值变动事件处理器 */
101409
101293
  _this.handleValueChange = function (color) {
101294
+ var _this$props = _this.props,
101295
+ keyRoute = _this$props.keyRoute,
101296
+ jsonStore = _this$props.jsonStore;
101297
+ var _ref = jsonStore || {},
101298
+ updateFormValueData = _ref.updateFormValueData;
101410
101299
  var rgb = color.rgb; // hex,
101411
101300
  var rgbaVal =
101412
101301
  'rgba(' +
@@ -101418,9 +101307,6 @@ styles.join("\\n")
101418
101307
  ',' +
101419
101308
  rgb.a +
101420
101309
  ')';
101421
- var _this$props = _this.props,
101422
- keyRoute = _this$props.keyRoute,
101423
- updateFormValueData = _this$props.updateFormValueData;
101424
101310
  // updateFormValueData(keyRoute, hex); // 更新数值(#ffffff数据格式)
101425
101311
  updateFormValueData(keyRoute, rgbaVal); // 更新数值: rgba(255,255,255,100)
101426
101312
  // 主动触发更新的状态数据
@@ -101432,7 +101318,9 @@ styles.join("\\n")
101432
101318
  _this.deleteColor = function () {
101433
101319
  var _this$props2 = _this.props,
101434
101320
  keyRoute = _this$props2.keyRoute,
101435
- updateFormValueData = _this$props2.updateFormValueData;
101321
+ jsonStore = _this$props2.jsonStore;
101322
+ var _ref2 = jsonStore || {},
101323
+ updateFormValueData = _ref2.updateFormValueData;
101436
101324
  updateFormValueData(keyRoute, 'initial'); // 更新数值
101437
101325
  antd__WEBPACK_IMPORTED_MODULE_7__['default'].success(
101438
101326
  '已移除当前设置的颜色值',
@@ -101475,12 +101363,17 @@ styles.join("\\n")
101475
101363
  _proto.render = function render() {
101476
101364
  var _this2 = this;
101477
101365
  var _this$props3 = this.props,
101478
- keyRoute = _this$props3.keyRoute,
101479
- jsonKey = _this$props3.jsonKey,
101480
- nodeKey = _this$props3.nodeKey,
101481
- targetJsonSchema = _this$props3.targetJsonSchema,
101482
- pageScreen = _this$props3.pageScreen,
101483
- getJSONDataByKeyRoute = _this$props3.getJSONDataByKeyRoute;
101366
+ schemaStore = _this$props3.schemaStore,
101367
+ jsonStore = _this$props3.jsonStore;
101368
+ var _ref3 = schemaStore || {},
101369
+ pageScreen = _ref3.pageScreen;
101370
+ var _ref4 = jsonStore || {},
101371
+ getJSONDataByKeyRoute = _ref4.getJSONDataByKeyRoute;
101372
+ var _this$props4 = this.props,
101373
+ keyRoute = _this$props4.keyRoute,
101374
+ jsonKey = _this$props4.jsonKey,
101375
+ nodeKey = _this$props4.nodeKey,
101376
+ targetJsonSchema = _this$props4.targetJsonSchema;
101484
101377
  var _this$state = this.state,
101485
101378
  renderState = _this$state.renderState,
101486
101379
  displayColorPicker = _this$state.displayColorPicker;
@@ -101637,12 +101530,8 @@ styles.join("\\n")
101637
101530
  /* harmony default export */ __webpack_exports__['default'] = (0,
101638
101531
  mobx_react__WEBPACK_IMPORTED_MODULE_12__.inject)(function (stores) {
101639
101532
  return {
101640
- pageScreen: stores.JSONSchemaStore.pageScreen,
101641
- getJSONDataByKeyRoute:
101642
- stores.JSONEditorStore.getJSONDataByKeyRoute,
101643
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
101644
- getInitJsonDataByKeyRoute:
101645
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
101533
+ schemaStore: stores.JSONSchemaStore,
101534
+ jsonStore: stores.JSONEditorStore,
101646
101535
  };
101647
101536
  })(
101648
101537
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_12__.observer)(
@@ -101790,12 +101679,16 @@ styles.join("\\n")
101790
101679
  var _targetJsonSchema$sho,
101791
101680
  _this2 = this;
101792
101681
  var _this$props = this.props,
101793
- keyRoute = _this$props.keyRoute,
101794
- jsonKey = _this$props.jsonKey,
101795
- nodeKey = _this$props.nodeKey,
101796
- indexRoute = _this$props.indexRoute,
101797
- targetJsonSchema = _this$props.targetJsonSchema,
101798
- pageScreen = _this$props.pageScreen;
101682
+ schemaStore = _this$props.schemaStore,
101683
+ jsonStore = _this$props.jsonStore;
101684
+ var _ref = schemaStore || {},
101685
+ pageScreen = _ref.pageScreen;
101686
+ var _this$props2 = this.props,
101687
+ keyRoute = _this$props2.keyRoute,
101688
+ jsonKey = _this$props2.jsonKey,
101689
+ nodeKey = _this$props2.nodeKey,
101690
+ indexRoute = _this$props2.indexRoute,
101691
+ targetJsonSchema = _this$props2.targetJsonSchema;
101799
101692
  var _this$state = this.state,
101800
101693
  jsonView = _this$state.jsonView,
101801
101694
  isClosed = _this$state.isClosed,
@@ -102102,13 +101995,8 @@ styles.join("\\n")
102102
101995
  /* harmony default export */ __webpack_exports__['default'] = (0,
102103
101996
  mobx_react__WEBPACK_IMPORTED_MODULE_16__.inject)(function (stores) {
102104
101997
  return {
102105
- triggerChange: stores.JSONEditorStore.triggerChange,
102106
- pageScreen: stores.JSONSchemaStore.pageScreen,
102107
- getJSONDataByKeyRoute:
102108
- stores.JSONEditorStore.getJSONDataByKeyRoute,
102109
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
102110
- getInitJsonDataByKeyRoute:
102111
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
101998
+ schemaStore: stores.JSONSchemaStore,
101999
+ jsonStore: stores.JSONEditorStore,
102112
102000
  };
102113
102001
  })(
102114
102002
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_16__.observer)(
@@ -102193,7 +102081,9 @@ styles.join("\\n")
102193
102081
  _this.handleValueChange = function (event, dateString) {
102194
102082
  var _this$props = _this.props,
102195
102083
  keyRoute = _this$props.keyRoute,
102196
- updateFormValueData = _this$props.updateFormValueData;
102084
+ jsonStore = _this$props.jsonStore;
102085
+ var _ref = jsonStore || {},
102086
+ updateFormValueData = _ref.updateFormValueData;
102197
102087
  updateFormValueData(keyRoute, dateString); // 更新数值
102198
102088
  };
102199
102089
  _this.handleValueChange = _this.handleValueChange.bind(_this);
@@ -102222,12 +102112,17 @@ styles.join("\\n")
102222
102112
  };
102223
102113
  _proto.render = function render() {
102224
102114
  var _this$props2 = this.props,
102225
- keyRoute = _this$props2.keyRoute,
102226
- jsonKey = _this$props2.jsonKey,
102227
- nodeKey = _this$props2.nodeKey,
102228
- targetJsonSchema = _this$props2.targetJsonSchema,
102229
- pageScreen = _this$props2.pageScreen,
102230
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
102115
+ schemaStore = _this$props2.schemaStore,
102116
+ jsonStore = _this$props2.jsonStore;
102117
+ var _ref2 = schemaStore || {},
102118
+ pageScreen = _ref2.pageScreen;
102119
+ var _ref3 = jsonStore || {},
102120
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
102121
+ var _this$props3 = this.props,
102122
+ keyRoute = _this$props3.keyRoute,
102123
+ jsonKey = _this$props3.jsonKey,
102124
+ nodeKey = _this$props3.nodeKey,
102125
+ targetJsonSchema = _this$props3.targetJsonSchema;
102231
102126
  var curType = targetJsonSchema.type;
102232
102127
  var readOnly = targetJsonSchema.readOnly || false; // 是否只读(默认可编辑)
102233
102128
  var isRequired = targetJsonSchema.isRequired || false; // 是否必填(默认非必填)
@@ -102349,12 +102244,8 @@ styles.join("\\n")
102349
102244
  /* harmony default export */ __webpack_exports__['default'] = (0,
102350
102245
  mobx_react__WEBPACK_IMPORTED_MODULE_9__.inject)(function (stores) {
102351
102246
  return {
102352
- pageScreen: stores.JSONSchemaStore.pageScreen,
102353
- getJSONDataByKeyRoute:
102354
- stores.JSONEditorStore.getJSONDataByKeyRoute,
102355
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
102356
- getInitJsonDataByKeyRoute:
102357
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
102247
+ schemaStore: stores.JSONSchemaStore,
102248
+ jsonStore: stores.JSONEditorStore,
102358
102249
  };
102359
102250
  })(
102360
102251
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_9__.observer)(
@@ -102386,7 +102277,7 @@ styles.join("\\n")
102386
102277
  /*#__PURE__*/ __webpack_require__.n(
102387
102278
  react__WEBPACK_IMPORTED_MODULE_1__,
102388
102279
  );
102389
- /* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_13__ =
102280
+ /* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_14__ =
102390
102281
  __webpack_require__(
102391
102282
  /*! mobx-react */ '../../node_modules/mobx-react/dist/mobxreact.esm.js',
102392
102283
  );
@@ -102394,23 +102285,23 @@ styles.join("\\n")
102394
102285
  __webpack_require__(
102395
102286
  /*! mobx */ '../../node_modules/mobx/lib/mobx.module.js',
102396
102287
  );
102397
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12__ =
102288
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_13__ =
102398
102289
  __webpack_require__(
102399
102290
  /*! prop-types */ '../../node_modules/prop-types/index.js',
102400
102291
  );
102401
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12___default =
102292
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_13___default =
102402
102293
  /*#__PURE__*/ __webpack_require__.n(
102403
- prop_types__WEBPACK_IMPORTED_MODULE_12__,
102294
+ prop_types__WEBPACK_IMPORTED_MODULE_13__,
102404
102295
  );
102405
- /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ =
102296
+ /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_10__ =
102406
102297
  __webpack_require__(
102407
102298
  /*! antd */ '../../node_modules/antd/es/tooltip/index.js',
102408
102299
  );
102409
- /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_10__ =
102300
+ /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_11__ =
102410
102301
  __webpack_require__(
102411
102302
  /*! @ant-design/icons */ '../../node_modules/@ant-design/icons/es/icons/RightOutlined.js',
102412
102303
  );
102413
- /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_11__ =
102304
+ /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_12__ =
102414
102305
  __webpack_require__(
102415
102306
  /*! @ant-design/icons */ '../../node_modules/@ant-design/icons/es/icons/DownOutlined.js',
102416
102307
  );
@@ -102430,7 +102321,11 @@ styles.join("\\n")
102430
102321
  );
102431
102322
  /* harmony import */ var $mixins_index__WEBPACK_IMPORTED_MODULE_7__ =
102432
102323
  __webpack_require__(/*! $mixins/index */ './src/mixins/index.js');
102433
- /* harmony import */ var $assets_img_code_svg__WEBPACK_IMPORTED_MODULE_8__ =
102324
+ /* harmony import */ var $utils_webCache__WEBPACK_IMPORTED_MODULE_8__ =
102325
+ __webpack_require__(
102326
+ /*! $utils/webCache */ './src/utils/webCache.js',
102327
+ );
102328
+ /* harmony import */ var $assets_img_code_svg__WEBPACK_IMPORTED_MODULE_9__ =
102434
102329
  __webpack_require__(
102435
102330
  /*! $assets/img/code.svg */ './src/assets/img/code.svg',
102436
102331
  );
@@ -102444,6 +102339,7 @@ styles.join("\\n")
102444
102339
  // 是否显示code模式
102445
102340
  isClosed: false, // 是否为关闭状态,默认是开启状态
102446
102341
  };
102342
+ _this.collapseChange = _this.collapseChange.bind(_this);
102447
102343
  return _this;
102448
102344
  }
102449
102345
  (0,
@@ -102467,25 +102363,45 @@ styles.join("\\n")
102467
102363
  );
102468
102364
  }
102469
102365
  };
102366
+ _proto.collapseChange = function collapseChange(event) {
102367
+ var keyRoute = this.props.keyRoute;
102368
+ var isClosed = this.state.isClosed;
102369
+ this.setState({
102370
+ isClosed: !isClosed,
102371
+ });
102372
+ event.preventDefault();
102373
+ event.stopPropagation();
102374
+
102375
+ // 缓存当前折叠状态
102376
+ (0,
102377
+ $utils_webCache__WEBPACK_IMPORTED_MODULE_8__.saveJSONEditorCache)(
102378
+ keyRoute,
102379
+ !isClosed,
102380
+ );
102381
+ };
102470
102382
  _proto.render = function render() {
102471
102383
  var _targetJsonSchema$sho,
102472
102384
  _this2 = this;
102473
102385
  var _this$props = this.props,
102474
- indexRoute = _this$props.indexRoute,
102475
- jsonKey = _this$props.jsonKey,
102476
- nodeKey = _this$props.nodeKey,
102477
- keyRoute = _this$props.keyRoute,
102478
- pageScreen = _this$props.pageScreen,
102479
- targetJsonSchema = _this$props.targetJsonSchema,
102480
- isArrayItem = _this$props.isArrayItem,
102481
- isStructuredSchema = _this$props.isStructuredSchema,
102482
- getJSONDataByKeyRoute = _this$props.getJSONDataByKeyRoute,
102483
- keyRoute2indexRoute = _this$props.keyRoute2indexRoute,
102484
- updateFormValueData = _this$props.updateFormValueData;
102386
+ schemaStore = _this$props.schemaStore,
102387
+ jsonStore = _this$props.jsonStore;
102388
+ var _ref = schemaStore || {},
102389
+ pageScreen = _ref.pageScreen;
102390
+ var _ref2 = jsonStore || {},
102391
+ _options = _ref2.options,
102392
+ getJSONDataByKeyRoute = _ref2.getJSONDataByKeyRoute;
102393
+ var _this$props2 = this.props,
102394
+ indexRoute = _this$props2.indexRoute,
102395
+ jsonKey = _this$props2.jsonKey,
102396
+ nodeKey = _this$props2.nodeKey,
102397
+ keyRoute = _this$props2.keyRoute,
102398
+ targetJsonSchema = _this$props2.targetJsonSchema,
102399
+ isArrayItem = _this$props2.isArrayItem,
102400
+ isStructuredSchema = _this$props2.isStructuredSchema;
102485
102401
  var _this$state = this.state,
102486
102402
  jsonView = _this$state.jsonView,
102487
- isClosed = _this$state.isClosed;
102488
- var options = this.props.options || {};
102403
+ _isClosed = _this$state.isClosed;
102404
+ var options = _options || {};
102489
102405
  // 判断是否结构化Schema,如果是则不显示Title,避免重复的title
102490
102406
  var isStructured = isStructuredSchema;
102491
102407
  // 是否显示源码切换按钮
@@ -102501,6 +102417,16 @@ styles.join("\\n")
102501
102417
  // 内容Meta数据
102502
102418
  var metaContentKeyList = options.metaContentKeyList || [];
102503
102419
  var globalMetaConfig = options.globalMetaConfig || [];
102420
+
102421
+ // 获取前端缓存中的折叠数据
102422
+ var isClosed = _isClosed;
102423
+ var collapseCacheData = (0,
102424
+ $utils_webCache__WEBPACK_IMPORTED_MODULE_8__.getJSONEditorCache)(
102425
+ keyRoute,
102426
+ );
102427
+ if (collapseCacheData !== undefined) {
102428
+ isClosed = collapseCacheData;
102429
+ }
102504
102430
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
102505
102431
  'div',
102506
102432
  {
@@ -102520,7 +102446,7 @@ styles.join("\\n")
102520
102446
  className: 'element-title',
102521
102447
  },
102522
102448
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
102523
- antd__WEBPACK_IMPORTED_MODULE_9__['default'],
102449
+ antd__WEBPACK_IMPORTED_MODULE_10__['default'],
102524
102450
  {
102525
102451
  title: targetJsonSchema.description,
102526
102452
  placement: 'top',
@@ -102564,13 +102490,7 @@ styles.join("\\n")
102564
102490
  'div',
102565
102491
  {
102566
102492
  className: 'element-title',
102567
- onClick: function onClick(event) {
102568
- _this2.setState({
102569
- isClosed: !isClosed,
102570
- });
102571
- event.preventDefault();
102572
- event.stopPropagation();
102573
- },
102493
+ onClick: this.collapseChange,
102574
102494
  },
102575
102495
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
102576
102496
  'span',
@@ -102581,7 +102501,7 @@ styles.join("\\n")
102581
102501
  ),
102582
102502
  isClosed
102583
102503
  ? /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
102584
- _ant_design_icons__WEBPACK_IMPORTED_MODULE_10__[
102504
+ _ant_design_icons__WEBPACK_IMPORTED_MODULE_11__[
102585
102505
  'default'
102586
102506
  ],
102587
102507
  {
@@ -102589,7 +102509,7 @@ styles.join("\\n")
102589
102509
  },
102590
102510
  )
102591
102511
  : /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
102592
- _ant_design_icons__WEBPACK_IMPORTED_MODULE_11__[
102512
+ _ant_design_icons__WEBPACK_IMPORTED_MODULE_12__[
102593
102513
  'default'
102594
102514
  ],
102595
102515
  {
@@ -102610,12 +102530,12 @@ styles.join("\\n")
102610
102530
  },
102611
102531
  },
102612
102532
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
102613
- antd__WEBPACK_IMPORTED_MODULE_9__['default'],
102533
+ antd__WEBPACK_IMPORTED_MODULE_10__['default'],
102614
102534
  {
102615
102535
  title: jsonView ? '关闭源码模式' : '开启源码模式',
102616
102536
  },
102617
102537
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
102618
- $assets_img_code_svg__WEBPACK_IMPORTED_MODULE_8__[
102538
+ $assets_img_code_svg__WEBPACK_IMPORTED_MODULE_9__[
102619
102539
  'default'
102620
102540
  ],
102621
102541
  {
@@ -102662,28 +102582,16 @@ styles.join("\\n")
102662
102582
  /** 5. 获取当前元素的id,用于做唯一标识 */
102663
102583
  var childNodeKey =
102664
102584
  nodeKey + '-' + curType + '-' + currentJsonKey;
102665
- var visibleOn = [
102666
- 'description',
102667
- 'valueType',
102668
- 'range',
102669
- 'value',
102670
- ].includes(currentJsonKey)
102671
- ? false
102672
- : true; // 是否显示当前元素
102673
102585
 
102674
102586
  // 补充动态配置类型相关显隐逻辑【定制逻辑】
102675
102587
  if (
102676
- (currentJsonKey === 'description' ||
102677
- currentJsonKey === 'valueType') &&
102588
+ currentJsonKey === 'valueType' &&
102678
102589
  (curJsonData.type === 'ContentStaticConfig' ||
102679
102590
  curJsonData.type === 'ResourceCenter')
102680
102591
  ) {
102681
- // 资源中心配置、mp后台配置 时显示 description(属性名称)、valueType(配置方式)配置项
102682
- visibleOn = true;
102683
102592
  var valueSchema =
102684
102593
  targetJsonSchema.properties['value'];
102685
102594
  if (
102686
- currentJsonKey === 'valueType' &&
102687
102595
  !['select', 'radio', 'checkboxes'].includes(
102688
102596
  valueSchema.type,
102689
102597
  )
@@ -102694,15 +102602,13 @@ styles.join("\\n")
102694
102602
  currentSchemaData.description =
102695
102603
  '当前数值没有可选项,不支持设置。';
102696
102604
  }
102697
- } else if (currentJsonKey === 'range') {
102605
+ }
102606
+ if (currentJsonKey === 'range') {
102698
102607
  if (
102699
102608
  curJsonData.valueType === 'select' &&
102700
102609
  (curJsonData.type === 'ContentStaticConfig' ||
102701
102610
  curJsonData.type === 'ResourceCenter')
102702
102611
  ) {
102703
- visibleOn = true;
102704
- }
102705
- if (visibleOn) {
102706
102612
  var _valueSchema =
102707
102613
  targetJsonSchema.properties['value'];
102708
102614
  if (
@@ -102719,14 +102625,6 @@ styles.join("\\n")
102719
102625
  );
102720
102626
  }
102721
102627
  }
102722
- } else if (
102723
- currentJsonKey === 'value' &&
102724
- (curJsonData.type === 'DevDefaults' ||
102725
- curJsonData.type === 'RuntimeConst' ||
102726
- curJsonData.type === 'Content')
102727
- ) {
102728
- // 全局配置数据、内容Meta数据 显示 数据值 配置项
102729
- visibleOn = true;
102730
102628
  }
102731
102629
  if (
102732
102630
  currentJsonKey === 'value' &&
@@ -102749,22 +102647,19 @@ styles.join("\\n")
102749
102647
  globalMetaConfig,
102750
102648
  );
102751
102649
  }
102752
- if (visibleOn) {
102753
- return (0,
102754
- $components_MappingRender__WEBPACK_IMPORTED_MODULE_5__[
102755
- 'default'
102756
- ])({
102757
- parentType: curType,
102758
- jsonKey: currentJsonKey,
102759
- indexRoute: currentIndexRoute,
102760
- keyRoute: currentKeyRoute,
102761
- nodeKey: childNodeKey,
102762
- targetJsonSchema: currentSchemaData,
102763
- getJSONDataByKeyRoute: getJSONDataByKeyRoute,
102764
- keyRoute2indexRoute: keyRoute2indexRoute,
102765
- updateFormValueData: updateFormValueData,
102766
- });
102767
- }
102650
+ return (0,
102651
+ $components_MappingRender__WEBPACK_IMPORTED_MODULE_5__[
102652
+ 'default'
102653
+ ])({
102654
+ parentType: curType,
102655
+ jsonKey: currentJsonKey,
102656
+ indexRoute: currentIndexRoute,
102657
+ keyRoute: currentKeyRoute,
102658
+ nodeKey: childNodeKey,
102659
+ targetJsonSchema: currentSchemaData,
102660
+ schemaStore: schemaStore,
102661
+ jsonStore: jsonStore,
102662
+ });
102768
102663
  }),
102769
102664
  jsonView &&
102770
102665
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
@@ -102780,34 +102675,29 @@ styles.join("\\n")
102780
102675
  return ObjectSchema;
102781
102676
  })(react__WEBPACK_IMPORTED_MODULE_1___default().PureComponent);
102782
102677
  ObjectSchema.propTypes = {
102783
- isArrayItem: prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
102678
+ isArrayItem: prop_types__WEBPACK_IMPORTED_MODULE_13___default().any,
102784
102679
  // 如果是数组项,title会进行特殊显示
102785
- arrIndex: prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
102680
+ arrIndex: prop_types__WEBPACK_IMPORTED_MODULE_13___default().any,
102786
102681
  // 当前数组项
102787
102682
  parentType:
102788
- prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
102789
- jsonKey: prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
102790
- indexRoute: prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
102791
- keyRoute: prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
102792
- nodeKey: prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
102683
+ prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,
102684
+ jsonKey: prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,
102685
+ indexRoute: prop_types__WEBPACK_IMPORTED_MODULE_13___default().any,
102686
+ keyRoute: prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,
102687
+ nodeKey: prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,
102793
102688
  targetJsonSchema:
102794
- prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
102689
+ prop_types__WEBPACK_IMPORTED_MODULE_13___default().any,
102795
102690
  isStructuredSchema:
102796
- prop_types__WEBPACK_IMPORTED_MODULE_12___default().bool,
102691
+ prop_types__WEBPACK_IMPORTED_MODULE_13___default().bool,
102797
102692
  };
102798
102693
  /* harmony default export */ __webpack_exports__['default'] = (0,
102799
- mobx_react__WEBPACK_IMPORTED_MODULE_13__.inject)(function (stores) {
102694
+ mobx_react__WEBPACK_IMPORTED_MODULE_14__.inject)(function (stores) {
102800
102695
  return {
102801
- pageScreen: stores.JSONSchemaStore.pageScreen,
102802
- options: stores.JSONEditorStore.options,
102803
- getJSONDataByKeyRoute:
102804
- stores.JSONEditorStore.getJSONDataByKeyRoute,
102805
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
102806
- getInitJsonDataByKeyRoute:
102807
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
102696
+ schemaStore: stores.JSONSchemaStore,
102697
+ jsonStore: stores.JSONEditorStore,
102808
102698
  };
102809
102699
  })(
102810
- (0, mobx_react__WEBPACK_IMPORTED_MODULE_13__.observer)(
102700
+ (0, mobx_react__WEBPACK_IMPORTED_MODULE_14__.observer)(
102811
102701
  ObjectSchema,
102812
102702
  ),
102813
102703
  );
@@ -102917,7 +102807,8 @@ styles.join("\\n")
102917
102807
  _this = _React$PureComponent.call(this, props) || this;
102918
102808
  /** 数值变动事件处理器 */
102919
102809
  _this.handleValueChange = function (curKeyRoute, value) {
102920
- var updateFormValueData = _this.props.updateFormValueData;
102810
+ var _ref = _this.props.jsonStore || {},
102811
+ updateFormValueData = _ref.updateFormValueData;
102921
102812
  updateFormValueData(curKeyRoute, value); // 更新数值
102922
102813
  };
102923
102814
  // 显示和隐藏数据过滤器
@@ -102931,7 +102822,9 @@ styles.join("\\n")
102931
102822
  _this.tabChange = function (value) {
102932
102823
  var _this$props = _this.props,
102933
102824
  keyRoute = _this$props.keyRoute,
102934
- triggerChangeAction = _this$props.triggerChangeAction;
102825
+ jsonStore = _this$props.jsonStore;
102826
+ var _ref2 = jsonStore || {},
102827
+ triggerChangeAction = _ref2.triggerChangeAction;
102935
102828
  _this.handleValueChange(keyRoute + '-type', value);
102936
102829
  setTimeout(function () {
102937
102830
  triggerChangeAction();
@@ -102940,8 +102833,10 @@ styles.join("\\n")
102940
102833
  _this.dynamicDataChange = function (dynamicDataName) {
102941
102834
  var _this$props2 = _this.props,
102942
102835
  keyRoute = _this$props2.keyRoute,
102943
- dynamicDataObj = _this$props2.dynamicDataObj,
102944
- triggerChangeAction = _this$props2.triggerChangeAction;
102836
+ jsonStore = _this$props2.jsonStore;
102837
+ var _ref3 = jsonStore || {},
102838
+ triggerChangeAction = _ref3.triggerChangeAction,
102839
+ dynamicDataObj = _ref3.dynamicDataObj;
102945
102840
  var curDynamicData = (0,
102946
102841
  $utils_index__WEBPACK_IMPORTED_MODULE_11__.objClone)(
102947
102842
  (0, mobx__WEBPACK_IMPORTED_MODULE_13__.toJS)(
@@ -102973,8 +102868,10 @@ styles.join("\\n")
102973
102868
  _this.dataRouteChange = function (newDataRoute) {
102974
102869
  var _this$props3 = _this.props,
102975
102870
  keyRoute = _this$props3.keyRoute,
102976
- triggerChangeAction = _this$props3.triggerChangeAction,
102977
- updateFormValueData = _this$props3.updateFormValueData;
102871
+ jsonStore = _this$props3.jsonStore;
102872
+ var _ref4 = jsonStore || {},
102873
+ triggerChangeAction = _ref4.triggerChangeAction,
102874
+ updateFormValueData = _ref4.updateFormValueData;
102978
102875
  if (newDataRoute) {
102979
102876
  updateFormValueData(
102980
102877
  keyRoute + '-config-dataRoute',
@@ -103006,8 +102903,10 @@ styles.join("\\n")
103006
102903
  _this.paramsConfigChange = function (paramsKey, newParamsConfig) {
103007
102904
  var _this$props4 = _this.props,
103008
102905
  keyRoute = _this$props4.keyRoute,
103009
- triggerChangeAction = _this$props4.triggerChangeAction,
103010
- getJSONDataByKeyRoute = _this$props4.getJSONDataByKeyRoute;
102906
+ jsonStore = _this$props4.jsonStore;
102907
+ var _ref5 = jsonStore || {},
102908
+ triggerChangeAction = _ref5.triggerChangeAction,
102909
+ getJSONDataByKeyRoute = _ref5.getJSONDataByKeyRoute;
103011
102910
  var curParamsConfigData =
103012
102911
  getJSONDataByKeyRoute(
103013
102912
  keyRoute + '-config-body-' + paramsKey,
@@ -103051,16 +102950,21 @@ styles.join("\\n")
103051
102950
  _proto.render = function render() {
103052
102951
  var _this2 = this;
103053
102952
  var _this$props5 = this.props,
103054
- keyRoute = _this$props5.keyRoute,
103055
- jsonKey = _this$props5.jsonKey,
103056
- nodeKey = _this$props5.nodeKey,
103057
- indexRoute = _this$props5.indexRoute,
103058
- targetJsonSchema = _this$props5.targetJsonSchema,
103059
- dynamicDataList = _this$props5.dynamicDataList,
103060
- dynamicDataObj = _this$props5.dynamicDataObj,
103061
- dynamicDataApiScopeList = _this$props5.dynamicDataApiScopeList,
103062
- getJSONDataByKeyRoute = _this$props5.getJSONDataByKeyRoute,
103063
- pageScreen = _this$props5.pageScreen;
102953
+ schemaStore = _this$props5.schemaStore,
102954
+ jsonStore = _this$props5.jsonStore;
102955
+ var _ref6 = schemaStore || {},
102956
+ pageScreen = _ref6.pageScreen;
102957
+ var _ref7 = jsonStore || {},
102958
+ getJSONDataByKeyRoute = _ref7.getJSONDataByKeyRoute;
102959
+ var _this$props6 = this.props,
102960
+ keyRoute = _this$props6.keyRoute,
102961
+ jsonKey = _this$props6.jsonKey,
102962
+ nodeKey = _this$props6.nodeKey,
102963
+ indexRoute = _this$props6.indexRoute,
102964
+ targetJsonSchema = _this$props6.targetJsonSchema,
102965
+ dynamicDataList = _this$props6.dynamicDataList,
102966
+ dynamicDataObj = _this$props6.dynamicDataObj,
102967
+ dynamicDataApiScopeList = _this$props6.dynamicDataApiScopeList;
103064
102968
  var isShowFilter = this.state.isShowFilter;
103065
102969
  var curType = targetJsonSchema.type;
103066
102970
  // 从jsonData中获取对应的数值
@@ -103520,18 +103424,8 @@ styles.join("\\n")
103520
103424
  /* harmony default export */ __webpack_exports__['default'] = (0,
103521
103425
  mobx_react__WEBPACK_IMPORTED_MODULE_18__.inject)(function (stores) {
103522
103426
  return {
103523
- triggerChange: stores.JSONEditorStore.triggerChange,
103524
- triggerChangeAction: stores.JSONEditorStore.triggerChangeAction,
103525
- pageScreen: stores.JSONSchemaStore.pageScreen,
103526
- dynamicDataList: stores.JSONEditorStore.dynamicDataList,
103527
- dynamicDataObj: stores.JSONEditorStore.dynamicDataObj,
103528
- dynamicDataApiScopeList:
103529
- stores.JSONEditorStore.dynamicDataApiScopeList,
103530
- getJSONDataByKeyRoute:
103531
- stores.JSONEditorStore.getJSONDataByKeyRoute,
103532
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
103533
- getInitJsonDataByKeyRoute:
103534
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
103427
+ schemaStore: stores.JSONSchemaStore,
103428
+ jsonStore: stores.JSONEditorStore,
103535
103429
  };
103536
103430
  })(
103537
103431
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_18__.observer)(
@@ -103654,12 +103548,16 @@ styles.join("\\n")
103654
103548
  var _targetJsonSchema$sho,
103655
103549
  _this2 = this;
103656
103550
  var _this$props = this.props,
103657
- keyRoute = _this$props.keyRoute,
103658
- jsonKey = _this$props.jsonKey,
103659
- nodeKey = _this$props.nodeKey,
103660
- indexRoute = _this$props.indexRoute,
103661
- targetJsonSchema = _this$props.targetJsonSchema,
103662
- pageScreen = _this$props.pageScreen;
103551
+ schemaStore = _this$props.schemaStore,
103552
+ jsonStore = _this$props.jsonStore;
103553
+ var _ref = schemaStore || {},
103554
+ pageScreen = _ref.pageScreen;
103555
+ var _this$props2 = this.props,
103556
+ keyRoute = _this$props2.keyRoute,
103557
+ jsonKey = _this$props2.jsonKey,
103558
+ nodeKey = _this$props2.nodeKey,
103559
+ indexRoute = _this$props2.indexRoute,
103560
+ targetJsonSchema = _this$props2.targetJsonSchema;
103663
103561
  var curType = targetJsonSchema.type;
103664
103562
  var _this$state = this.state,
103665
103563
  jsonView = _this$state.jsonView,
@@ -103928,13 +103826,8 @@ styles.join("\\n")
103928
103826
  /* harmony default export */ __webpack_exports__['default'] = (0,
103929
103827
  mobx_react__WEBPACK_IMPORTED_MODULE_14__.inject)(function (stores) {
103930
103828
  return {
103931
- triggerChange: stores.JSONEditorStore.triggerChange,
103932
- pageScreen: stores.JSONSchemaStore.pageScreen,
103933
- getJSONDataByKeyRoute:
103934
- stores.JSONEditorStore.getJSONDataByKeyRoute,
103935
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
103936
- getInitJsonDataByKeyRoute:
103937
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
103829
+ schemaStore: stores.JSONSchemaStore,
103830
+ jsonStore: stores.JSONEditorStore,
103938
103831
  };
103939
103832
  })(
103940
103833
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_14__.observer)(EventSchema),
@@ -104024,7 +103917,9 @@ styles.join("\\n")
104024
103917
  _this.handleValueChange = function (newJsonData) {
104025
103918
  var _this$props = _this.props,
104026
103919
  keyRoute = _this$props.keyRoute,
104027
- updateFormValueData = _this$props.updateFormValueData;
103920
+ jsonStore = _this$props.jsonStore;
103921
+ var _ref = jsonStore || {},
103922
+ updateFormValueData = _ref.updateFormValueData;
104028
103923
  updateFormValueData(keyRoute, newJsonData); // 更新数值
104029
103924
  };
104030
103925
  _this.state = {
@@ -104060,12 +103955,17 @@ styles.join("\\n")
104060
103955
  _proto.render = function render() {
104061
103956
  var _this2 = this;
104062
103957
  var _this$props2 = this.props,
104063
- nodeKey = _this$props2.nodeKey,
104064
- jsonKey = _this$props2.jsonKey,
104065
- keyRoute = _this$props2.keyRoute,
104066
- targetJsonSchema = _this$props2.targetJsonSchema,
104067
- pageScreen = _this$props2.pageScreen,
104068
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
103958
+ schemaStore = _this$props2.schemaStore,
103959
+ jsonStore = _this$props2.jsonStore;
103960
+ var _ref2 = schemaStore || {},
103961
+ pageScreen = _ref2.pageScreen;
103962
+ var _ref3 = jsonStore || {},
103963
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
103964
+ var _this$props3 = this.props,
103965
+ nodeKey = _this$props3.nodeKey,
103966
+ jsonKey = _this$props3.jsonKey,
103967
+ keyRoute = _this$props3.keyRoute,
103968
+ targetJsonSchema = _this$props3.targetJsonSchema;
104069
103969
  var _this$state = this.state,
104070
103970
  isShowWarn = _this$state.isShowWarn,
104071
103971
  warnText = _this$state.warnText;
@@ -104251,12 +104151,8 @@ styles.join("\\n")
104251
104151
  /* harmony default export */ __webpack_exports__['default'] = (0,
104252
104152
  mobx_react__WEBPACK_IMPORTED_MODULE_11__.inject)(function (stores) {
104253
104153
  return {
104254
- pageScreen: stores.JSONSchemaStore.pageScreen,
104255
- getJSONDataByKeyRoute:
104256
- stores.JSONEditorStore.getJSONDataByKeyRoute,
104257
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
104258
- getInitJsonDataByKeyRoute:
104259
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
104154
+ schemaStore: stores.JSONSchemaStore,
104155
+ jsonStore: stores.JSONEditorStore,
104260
104156
  };
104261
104157
  })(
104262
104158
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_11__.observer)(
@@ -104328,14 +104224,16 @@ styles.join("\\n")
104328
104224
  // static contextType = ThemeContext;
104329
104225
  /** 数值变动事件处理器 */
104330
104226
  _this.handleValueChange = function (event) {
104227
+ var _this$props = _this.props,
104228
+ keyRoute = _this$props.keyRoute,
104229
+ jsonStore = _this$props.jsonStore;
104230
+ var _ref = jsonStore || {},
104231
+ updateFormValueData = _ref.updateFormValueData;
104331
104232
  var value = event.target.value;
104332
104233
  if (_this.props.onChange) {
104333
104234
  // 如果有监听数据变动函数则优先触发
104334
104235
  _this.props.onChange(value);
104335
104236
  } else {
104336
- var _this$props = _this.props,
104337
- keyRoute = _this$props.keyRoute,
104338
- updateFormValueData = _this$props.updateFormValueData;
104339
104237
  updateFormValueData(keyRoute, value); // 更新数值
104340
104238
  }
104341
104239
  };
@@ -104365,12 +104263,17 @@ styles.join("\\n")
104365
104263
  };
104366
104264
  _proto.render = function render() {
104367
104265
  var _this$props2 = this.props,
104368
- nodeKey = _this$props2.nodeKey,
104369
- jsonKey = _this$props2.jsonKey,
104370
- keyRoute = _this$props2.keyRoute,
104371
- targetJsonSchema = _this$props2.targetJsonSchema,
104372
- pageScreen = _this$props2.pageScreen,
104373
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
104266
+ schemaStore = _this$props2.schemaStore,
104267
+ jsonStore = _this$props2.jsonStore;
104268
+ var _ref2 = schemaStore || {},
104269
+ pageScreen = _ref2.pageScreen;
104270
+ var _ref3 = jsonStore || {},
104271
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
104272
+ var _this$props3 = this.props,
104273
+ nodeKey = _this$props3.nodeKey,
104274
+ jsonKey = _this$props3.jsonKey,
104275
+ keyRoute = _this$props3.keyRoute,
104276
+ targetJsonSchema = _this$props3.targetJsonSchema;
104374
104277
  // 从jsonData中获取对应的数值
104375
104278
  var curJsonData = keyRoute && getJSONDataByKeyRoute(keyRoute);
104376
104279
  var readOnly = targetJsonSchema.readOnly || false; // 是否只读(默认可编辑)
@@ -104498,12 +104401,8 @@ styles.join("\\n")
104498
104401
  /* harmony default export */ __webpack_exports__['default'] = (0,
104499
104402
  mobx_react__WEBPACK_IMPORTED_MODULE_8__.inject)(function (stores) {
104500
104403
  return {
104501
- pageScreen: stores.JSONSchemaStore.pageScreen,
104502
- getJSONDataByKeyRoute:
104503
- stores.JSONEditorStore.getJSONDataByKeyRoute,
104504
- getInitJsonDataByKeyRoute:
104505
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
104506
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
104404
+ schemaStore: stores.JSONSchemaStore,
104405
+ jsonStore: stores.JSONEditorStore,
104507
104406
  };
104508
104407
  })(
104509
104408
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(
@@ -104587,7 +104486,9 @@ styles.join("\\n")
104587
104486
  _this.handleImageChange = function (fileInfo) {
104588
104487
  var _this$props = _this.props,
104589
104488
  keyRoute = _this$props.keyRoute,
104590
- updateFormValueData = _this$props.updateFormValueData;
104489
+ jsonStore = _this$props.jsonStore;
104490
+ var _ref = jsonStore || {},
104491
+ updateFormValueData = _ref.updateFormValueData;
104591
104492
  if (fileInfo.file.status === 'uploading') {
104592
104493
  _this.setState({
104593
104494
  loading: true,
@@ -104609,11 +104510,20 @@ styles.join("\\n")
104609
104510
  loading: false,
104610
104511
  });
104611
104512
  };
104513
+ _this.handleDeleteChange = function () {
104514
+ var _this$props2 = _this.props,
104515
+ keyRoute = _this$props2.keyRoute,
104516
+ jsonStore = _this$props2.jsonStore;
104517
+ var _ref2 = jsonStore || {},
104518
+ updateFormValueData = _ref2.updateFormValueData;
104519
+ updateFormValueData(keyRoute, '');
104520
+ };
104612
104521
  _this.state = {
104613
104522
  loading: false,
104614
104523
  };
104615
104524
  // 这边绑定是必要的,这样 `this` 才能在回调函数中使用
104616
104525
  _this.handleImageChange = _this.handleImageChange.bind(_this);
104526
+ _this.handleDeleteChange = _this.handleDeleteChange.bind(_this);
104617
104527
  return _this;
104618
104528
  }
104619
104529
 
@@ -104642,13 +104552,18 @@ styles.join("\\n")
104642
104552
  };
104643
104553
  _proto.render = function render() {
104644
104554
  var _targetJsonSchema$lis;
104645
- var _this$props2 = this.props,
104646
- nodeKey = _this$props2.nodeKey,
104647
- jsonKey = _this$props2.jsonKey,
104648
- keyRoute = _this$props2.keyRoute,
104649
- targetJsonSchema = _this$props2.targetJsonSchema,
104650
- pageScreen = _this$props2.pageScreen,
104651
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
104555
+ var _this$props3 = this.props,
104556
+ schemaStore = _this$props3.schemaStore,
104557
+ jsonStore = _this$props3.jsonStore;
104558
+ var _ref3 = schemaStore || {},
104559
+ pageScreen = _ref3.pageScreen;
104560
+ var _ref4 = jsonStore || {},
104561
+ getJSONDataByKeyRoute = _ref4.getJSONDataByKeyRoute;
104562
+ var _this$props4 = this.props,
104563
+ nodeKey = _this$props4.nodeKey,
104564
+ jsonKey = _this$props4.jsonKey,
104565
+ keyRoute = _this$props4.keyRoute,
104566
+ targetJsonSchema = _this$props4.targetJsonSchema;
104652
104567
  var options = this.props.options || {};
104653
104568
  var loading = this.state.loading;
104654
104569
  // 从jsonData中获取对应的数值
@@ -104675,6 +104590,7 @@ styles.join("\\n")
104675
104590
  targetJsonSchema.authorization || 'authorization-content',
104676
104591
  },
104677
104592
  onChange: this.handleImageChange,
104593
+ onRemove: this.handleDeleteChange,
104678
104594
  };
104679
104595
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1__.createElement(
104680
104596
  'div',
@@ -104819,13 +104735,8 @@ styles.join("\\n")
104819
104735
  /* harmony default export */ __webpack_exports__['default'] = (0,
104820
104736
  mobx_react__WEBPACK_IMPORTED_MODULE_11__.inject)(function (stores) {
104821
104737
  return {
104822
- pageScreen: stores.JSONSchemaStore.pageScreen,
104823
- options: stores.JSONEditorStore.options,
104824
- getJSONDataByKeyRoute:
104825
- stores.JSONEditorStore.getJSONDataByKeyRoute,
104826
- getInitJsonDataByKeyRoute:
104827
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
104828
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
104738
+ schemaStore: stores.JSONSchemaStore,
104739
+ jsonStore: stores.JSONEditorStore,
104829
104740
  };
104830
104741
  })(
104831
104742
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_11__.observer)(
@@ -104919,7 +104830,9 @@ styles.join("\\n")
104919
104830
  _this.handleValueChange = function (newJsonData) {
104920
104831
  var _this$props = _this.props,
104921
104832
  keyRoute = _this$props.keyRoute,
104922
- updateFormValueData = _this$props.updateFormValueData;
104833
+ jsonStore = _this$props.jsonStore;
104834
+ var _ref = jsonStore || {},
104835
+ updateFormValueData = _ref.updateFormValueData;
104923
104836
  if (newJsonData) {
104924
104837
  updateFormValueData(keyRoute, newJsonData); // 更新数值
104925
104838
  }
@@ -104959,12 +104872,17 @@ styles.join("\\n")
104959
104872
  _proto.render = function render() {
104960
104873
  var _this2 = this;
104961
104874
  var _this$props2 = this.props,
104962
- nodeKey = _this$props2.nodeKey,
104963
- jsonKey = _this$props2.jsonKey,
104964
- keyRoute = _this$props2.keyRoute,
104965
- targetJsonSchema = _this$props2.targetJsonSchema,
104966
- pageScreen = _this$props2.pageScreen,
104967
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
104875
+ schemaStore = _this$props2.schemaStore,
104876
+ jsonStore = _this$props2.jsonStore;
104877
+ var _ref2 = schemaStore || {},
104878
+ pageScreen = _ref2.pageScreen;
104879
+ var _ref3 = jsonStore || {},
104880
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
104881
+ var _this$props3 = this.props,
104882
+ nodeKey = _this$props3.nodeKey,
104883
+ jsonKey = _this$props3.jsonKey,
104884
+ keyRoute = _this$props3.keyRoute,
104885
+ targetJsonSchema = _this$props3.targetJsonSchema;
104968
104886
  var _this$state = this.state,
104969
104887
  isShowWarn = _this$state.isShowWarn,
104970
104888
  warnText = _this$state.warnText,
@@ -105149,13 +105067,8 @@ styles.join("\\n")
105149
105067
  /* harmony default export */ __webpack_exports__['default'] = (0,
105150
105068
  mobx_react__WEBPACK_IMPORTED_MODULE_12__.inject)(function (stores) {
105151
105069
  return {
105152
- pageScreen: stores.JSONSchemaStore.pageScreen,
105153
- getJSONDataByKeyRoute:
105154
- stores.JSONEditorStore.getJSONDataByKeyRoute,
105155
- getInitJsonDataByKeyRoute:
105156
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
105157
- indexRoute2keyRoute: stores.JSONSchemaStore.indexRoute2keyRoute,
105158
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
105070
+ schemaStore: stores.JSONSchemaStore,
105071
+ jsonStore: stores.JSONEditorStore,
105159
105072
  };
105160
105073
  })(
105161
105074
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_12__.observer)(
@@ -105241,7 +105154,9 @@ styles.join("\\n")
105241
105154
  _this.handleValueChange = function (newJsonData) {
105242
105155
  var _this$props = _this.props,
105243
105156
  keyRoute = _this$props.keyRoute,
105244
- updateFormValueData = _this$props.updateFormValueData;
105157
+ jsonStore = _this$props.jsonStore;
105158
+ var _ref = jsonStore || {},
105159
+ updateFormValueData = _ref.updateFormValueData;
105245
105160
  if (newJsonData) {
105246
105161
  updateFormValueData(keyRoute, newJsonData); // 更新数值
105247
105162
  }
@@ -105255,11 +105170,12 @@ styles.join("\\n")
105255
105170
  ])(JsonView, _React$PureComponent);
105256
105171
  var _proto = JsonView.prototype;
105257
105172
  _proto.render = function render() {
105173
+ var _ref2 = this.props.jsonStore || {},
105174
+ getJSONDataByKeyRoute = _ref2.getJSONDataByKeyRoute;
105258
105175
  var _this$props2 = this.props,
105259
105176
  nodeKey = _this$props2.nodeKey,
105260
105177
  keyRoute = _this$props2.keyRoute,
105261
- targetJsonSchema = _this$props2.targetJsonSchema,
105262
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
105178
+ targetJsonSchema = _this$props2.targetJsonSchema;
105263
105179
  // 从jsonData中获取对应的数值
105264
105180
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
105265
105181
 
@@ -105335,11 +105251,8 @@ styles.join("\\n")
105335
105251
  /* harmony default export */ __webpack_exports__['default'] = (0,
105336
105252
  mobx_react__WEBPACK_IMPORTED_MODULE_8__.inject)(function (stores) {
105337
105253
  return {
105338
- pageScreen: stores.JSONSchemaStore.pageScreen,
105339
- getJSONDataByKeyRoute:
105340
- stores.JSONEditorStore.getJSONDataByKeyRoute,
105341
- getInitJsonDataByKeyRoute:
105342
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
105254
+ schemaStore: stores.JSONSchemaStore,
105255
+ jsonStore: stores.JSONEditorStore,
105343
105256
  };
105344
105257
  })((0, mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(JsonView));
105345
105258
 
@@ -105418,8 +105331,10 @@ styles.join("\\n")
105418
105331
  _this.handleValueChange = function (newVal) {
105419
105332
  var _this$props = _this.props,
105420
105333
  keyRoute = _this$props.keyRoute,
105421
- targetJsonSchema = _this$props.targetJsonSchema,
105422
- updateFormValueData = _this$props.updateFormValueData;
105334
+ jsonStore = _this$props.jsonStore;
105335
+ var _ref = jsonStore || {},
105336
+ updateFormValueData = _ref.updateFormValueData;
105337
+ var targetJsonSchema = _this.props.targetJsonSchema;
105423
105338
  if (newVal < targetJsonSchema.minimum) {
105424
105339
  antd__WEBPACK_IMPORTED_MODULE_6__['default'].warning(
105425
105340
  '\u5C0F\u4E8E\u8BBE\u5B9A\u7684\u6700\u5C0F\u6570\u503C' +
@@ -105484,12 +105399,17 @@ styles.join("\\n")
105484
105399
  _proto.render = function render() {
105485
105400
  var _this2 = this;
105486
105401
  var _this$props2 = this.props,
105487
- keyRoute = _this$props2.keyRoute,
105488
- jsonKey = _this$props2.jsonKey,
105489
- nodeKey = _this$props2.nodeKey,
105490
- targetJsonSchema = _this$props2.targetJsonSchema,
105491
- pageScreen = _this$props2.pageScreen,
105492
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
105402
+ schemaStore = _this$props2.schemaStore,
105403
+ jsonStore = _this$props2.jsonStore;
105404
+ var _ref2 = schemaStore || {},
105405
+ pageScreen = _ref2.pageScreen;
105406
+ var _ref3 = jsonStore || {},
105407
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
105408
+ var _this$props3 = this.props,
105409
+ keyRoute = _this$props3.keyRoute,
105410
+ jsonKey = _this$props3.jsonKey,
105411
+ nodeKey = _this$props3.nodeKey,
105412
+ targetJsonSchema = _this$props3.targetJsonSchema;
105493
105413
  var renderTime = this.state.renderTime;
105494
105414
  // 从jsonData中获取对应的数值
105495
105415
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
@@ -105654,12 +105574,8 @@ styles.join("\\n")
105654
105574
  /* harmony default export */ __webpack_exports__['default'] = (0,
105655
105575
  mobx_react__WEBPACK_IMPORTED_MODULE_10__.inject)(function (stores) {
105656
105576
  return {
105657
- pageScreen: stores.JSONSchemaStore.pageScreen,
105658
- getJSONDataByKeyRoute:
105659
- stores.JSONEditorStore.getJSONDataByKeyRoute,
105660
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
105661
- getInitJsonDataByKeyRoute:
105662
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
105577
+ schemaStore: stores.JSONSchemaStore,
105578
+ jsonStore: stores.JSONEditorStore,
105663
105579
  };
105664
105580
  })(
105665
105581
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer)(
@@ -105691,27 +105607,27 @@ styles.join("\\n")
105691
105607
  /*#__PURE__*/ __webpack_require__.n(
105692
105608
  react__WEBPACK_IMPORTED_MODULE_1__,
105693
105609
  );
105694
- /* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_12__ =
105610
+ /* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_13__ =
105695
105611
  __webpack_require__(
105696
105612
  /*! mobx-react */ '../../node_modules/mobx-react/dist/mobxreact.esm.js',
105697
105613
  );
105698
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ =
105614
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12__ =
105699
105615
  __webpack_require__(
105700
105616
  /*! prop-types */ '../../node_modules/prop-types/index.js',
105701
105617
  );
105702
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default =
105618
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12___default =
105703
105619
  /*#__PURE__*/ __webpack_require__.n(
105704
- prop_types__WEBPACK_IMPORTED_MODULE_11__,
105620
+ prop_types__WEBPACK_IMPORTED_MODULE_12__,
105705
105621
  );
105706
- /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ =
105622
+ /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ =
105707
105623
  __webpack_require__(
105708
105624
  /*! antd */ '../../node_modules/antd/es/tooltip/index.js',
105709
105625
  );
105710
- /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_9__ =
105626
+ /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_10__ =
105711
105627
  __webpack_require__(
105712
105628
  /*! @ant-design/icons */ '../../node_modules/@ant-design/icons/es/icons/RightOutlined.js',
105713
105629
  );
105714
- /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_10__ =
105630
+ /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_11__ =
105715
105631
  __webpack_require__(
105716
105632
  /*! @ant-design/icons */ '../../node_modules/@ant-design/icons/es/icons/DownOutlined.js',
105717
105633
  );
@@ -105729,17 +105645,21 @@ styles.join("\\n")
105729
105645
  );
105730
105646
  /* harmony import */ var $mixins_index__WEBPACK_IMPORTED_MODULE_5__ =
105731
105647
  __webpack_require__(/*! $mixins/index */ './src/mixins/index.js');
105732
- /* harmony import */ var $assets_img_code_svg__WEBPACK_IMPORTED_MODULE_6__ =
105648
+ /* harmony import */ var $utils_webCache__WEBPACK_IMPORTED_MODULE_6__ =
105649
+ __webpack_require__(
105650
+ /*! $utils/webCache */ './src/utils/webCache.js',
105651
+ );
105652
+ /* harmony import */ var $assets_img_code_svg__WEBPACK_IMPORTED_MODULE_7__ =
105733
105653
  __webpack_require__(
105734
105654
  /*! $assets/img/code.svg */ './src/assets/img/code.svg',
105735
105655
  );
105736
- /* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_7__ =
105656
+ /* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_8__ =
105737
105657
  __webpack_require__(
105738
105658
  /*! ./index.scss */ './src/renderers/ObjectSchema/index.scss',
105739
105659
  );
105740
- /* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_7___default =
105660
+ /* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_8___default =
105741
105661
  /*#__PURE__*/ __webpack_require__.n(
105742
- _index_scss__WEBPACK_IMPORTED_MODULE_7__,
105662
+ _index_scss__WEBPACK_IMPORTED_MODULE_8__,
105743
105663
  );
105744
105664
 
105745
105665
  var ObjectSchema = /*#__PURE__*/ (function (_React$PureComponent) {
@@ -105751,6 +105671,7 @@ styles.join("\\n")
105751
105671
  // 是否显示code模式
105752
105672
  isClosed: false, // 是否为关闭状态,默认是开启状态
105753
105673
  };
105674
+ _this.collapseChange = _this.collapseChange.bind(_this);
105754
105675
  return _this;
105755
105676
  }
105756
105677
  (0,
@@ -105774,25 +105695,42 @@ styles.join("\\n")
105774
105695
  );
105775
105696
  }
105776
105697
  };
105698
+ _proto.collapseChange = function collapseChange(event) {
105699
+ var keyRoute = this.props.keyRoute;
105700
+ var isClosed = this.state.isClosed;
105701
+ this.setState({
105702
+ isClosed: !isClosed,
105703
+ });
105704
+ event.preventDefault();
105705
+ event.stopPropagation();
105706
+
105707
+ // 缓存当前折叠状态
105708
+ (0,
105709
+ $utils_webCache__WEBPACK_IMPORTED_MODULE_6__.saveJSONEditorCache)(
105710
+ keyRoute,
105711
+ !isClosed,
105712
+ );
105713
+ };
105777
105714
  _proto.render = function render() {
105778
105715
  var _targetJsonSchema$sho,
105779
105716
  _this2 = this;
105780
105717
  var _this$props = this.props,
105781
- indexRoute = _this$props.indexRoute,
105782
- jsonKey = _this$props.jsonKey,
105783
- nodeKey = _this$props.nodeKey,
105784
- keyRoute = _this$props.keyRoute,
105785
- pageScreen = _this$props.pageScreen,
105786
- targetJsonSchema = _this$props.targetJsonSchema,
105787
- isArrayItem = _this$props.isArrayItem,
105788
- arrIndex = _this$props.arrIndex,
105789
- isStructuredSchema = _this$props.isStructuredSchema,
105790
- getJSONDataByKeyRoute = _this$props.getJSONDataByKeyRoute,
105791
- keyRoute2indexRoute = _this$props.keyRoute2indexRoute,
105792
- updateFormValueData = _this$props.updateFormValueData;
105718
+ schemaStore = _this$props.schemaStore,
105719
+ jsonStore = _this$props.jsonStore;
105720
+ var _ref = schemaStore || {},
105721
+ pageScreen = _ref.pageScreen;
105722
+ var _this$props2 = this.props,
105723
+ indexRoute = _this$props2.indexRoute,
105724
+ jsonKey = _this$props2.jsonKey,
105725
+ nodeKey = _this$props2.nodeKey,
105726
+ keyRoute = _this$props2.keyRoute,
105727
+ targetJsonSchema = _this$props2.targetJsonSchema,
105728
+ isArrayItem = _this$props2.isArrayItem,
105729
+ arrIndex = _this$props2.arrIndex,
105730
+ isStructuredSchema = _this$props2.isStructuredSchema;
105793
105731
  var _this$state = this.state,
105794
105732
  jsonView = _this$state.jsonView,
105795
- isClosed = _this$state.isClosed;
105733
+ _isClosed = _this$state.isClosed;
105796
105734
  // 判断是否结构化Schema,如果是则不显示Title,避免重复的title
105797
105735
  var isStructured = isStructuredSchema;
105798
105736
  // 是否显示源码切换按钮
@@ -105801,6 +105739,16 @@ styles.join("\\n")
105801
105739
  null
105802
105740
  ? _targetJsonSchema$sho
105803
105741
  : true;
105742
+
105743
+ // 获取前端缓存中的折叠数据
105744
+ var isClosed = _isClosed;
105745
+ var collapseCacheData = (0,
105746
+ $utils_webCache__WEBPACK_IMPORTED_MODULE_6__.getJSONEditorCache)(
105747
+ keyRoute,
105748
+ );
105749
+ if (collapseCacheData !== undefined) {
105750
+ isClosed = collapseCacheData;
105751
+ }
105804
105752
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
105805
105753
  'div',
105806
105754
  {
@@ -105819,7 +105767,7 @@ styles.join("\\n")
105819
105767
  className: 'element-title',
105820
105768
  },
105821
105769
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
105822
- antd__WEBPACK_IMPORTED_MODULE_8__['default'],
105770
+ antd__WEBPACK_IMPORTED_MODULE_9__['default'],
105823
105771
  {
105824
105772
  title: targetJsonSchema.description,
105825
105773
  placement: 'top',
@@ -105863,13 +105811,7 @@ styles.join("\\n")
105863
105811
  'div',
105864
105812
  {
105865
105813
  className: 'element-title',
105866
- onClick: function onClick(event) {
105867
- _this2.setState({
105868
- isClosed: !isClosed,
105869
- });
105870
- event.preventDefault();
105871
- event.stopPropagation();
105872
- },
105814
+ onClick: this.collapseChange,
105873
105815
  },
105874
105816
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
105875
105817
  'span',
@@ -105880,7 +105822,7 @@ styles.join("\\n")
105880
105822
  ),
105881
105823
  isClosed
105882
105824
  ? /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
105883
- _ant_design_icons__WEBPACK_IMPORTED_MODULE_9__[
105825
+ _ant_design_icons__WEBPACK_IMPORTED_MODULE_10__[
105884
105826
  'default'
105885
105827
  ],
105886
105828
  {
@@ -105888,7 +105830,7 @@ styles.join("\\n")
105888
105830
  },
105889
105831
  )
105890
105832
  : /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
105891
- _ant_design_icons__WEBPACK_IMPORTED_MODULE_10__[
105833
+ _ant_design_icons__WEBPACK_IMPORTED_MODULE_11__[
105892
105834
  'default'
105893
105835
  ],
105894
105836
  {
@@ -105909,12 +105851,12 @@ styles.join("\\n")
105909
105851
  },
105910
105852
  },
105911
105853
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
105912
- antd__WEBPACK_IMPORTED_MODULE_8__['default'],
105854
+ antd__WEBPACK_IMPORTED_MODULE_9__['default'],
105913
105855
  {
105914
105856
  title: jsonView ? '关闭源码模式' : '开启源码模式',
105915
105857
  },
105916
105858
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
105917
- $assets_img_code_svg__WEBPACK_IMPORTED_MODULE_6__[
105859
+ $assets_img_code_svg__WEBPACK_IMPORTED_MODULE_7__[
105918
105860
  'default'
105919
105861
  ],
105920
105862
  {
@@ -105969,9 +105911,8 @@ styles.join("\\n")
105969
105911
  keyRoute: currentKeyRoute,
105970
105912
  nodeKey: childNodeKey,
105971
105913
  targetJsonSchema: currentSchemaData,
105972
- getJSONDataByKeyRoute: getJSONDataByKeyRoute,
105973
- keyRoute2indexRoute: keyRoute2indexRoute,
105974
- updateFormValueData: updateFormValueData,
105914
+ schemaStore: schemaStore,
105915
+ jsonStore: jsonStore,
105975
105916
  });
105976
105917
  }),
105977
105918
  jsonView &&
@@ -105988,33 +105929,29 @@ styles.join("\\n")
105988
105929
  return ObjectSchema;
105989
105930
  })(react__WEBPACK_IMPORTED_MODULE_1___default().PureComponent);
105990
105931
  ObjectSchema.propTypes = {
105991
- isArrayItem: prop_types__WEBPACK_IMPORTED_MODULE_11___default().any,
105932
+ isArrayItem: prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
105992
105933
  // 如果是数组项,title会进行特殊显示
105993
- arrIndex: prop_types__WEBPACK_IMPORTED_MODULE_11___default().any,
105934
+ arrIndex: prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
105994
105935
  // 当前数组项
105995
105936
  parentType:
105996
- prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,
105997
- jsonKey: prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,
105998
- indexRoute: prop_types__WEBPACK_IMPORTED_MODULE_11___default().any,
105999
- keyRoute: prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,
106000
- nodeKey: prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,
105937
+ prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
105938
+ jsonKey: prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
105939
+ indexRoute: prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
105940
+ keyRoute: prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
105941
+ nodeKey: prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
106001
105942
  targetJsonSchema:
106002
- prop_types__WEBPACK_IMPORTED_MODULE_11___default().any,
105943
+ prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
106003
105944
  isStructuredSchema:
106004
- prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool,
105945
+ prop_types__WEBPACK_IMPORTED_MODULE_12___default().bool,
106005
105946
  };
106006
105947
  /* harmony default export */ __webpack_exports__['default'] = (0,
106007
- mobx_react__WEBPACK_IMPORTED_MODULE_12__.inject)(function (stores) {
105948
+ mobx_react__WEBPACK_IMPORTED_MODULE_13__.inject)(function (stores) {
106008
105949
  return {
106009
- pageScreen: stores.JSONSchemaStore.pageScreen,
106010
- getJSONDataByKeyRoute:
106011
- stores.JSONEditorStore.getJSONDataByKeyRoute,
106012
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
106013
- getInitJsonDataByKeyRoute:
106014
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
105950
+ schemaStore: stores.JSONSchemaStore,
105951
+ jsonStore: stores.JSONEditorStore,
106015
105952
  };
106016
105953
  })(
106017
- (0, mobx_react__WEBPACK_IMPORTED_MODULE_12__.observer)(
105954
+ (0, mobx_react__WEBPACK_IMPORTED_MODULE_13__.observer)(
106018
105955
  ObjectSchema,
106019
105956
  ),
106020
105957
  );
@@ -106079,10 +106016,12 @@ styles.join("\\n")
106079
106016
  // 这边绑定是必要的,这样 `this` 才能在回调函数中使用
106080
106017
  /** 数值变动事件处理器 */
106081
106018
  _this.handleValueChange = function (event) {
106082
- var value = event.target.value;
106083
106019
  var _this$props = _this.props,
106084
106020
  keyRoute = _this$props.keyRoute,
106085
- updateFormValueData = _this$props.updateFormValueData;
106021
+ jsonStore = _this$props.jsonStore;
106022
+ var _ref = jsonStore || {},
106023
+ updateFormValueData = _ref.updateFormValueData;
106024
+ var value = event.target.value;
106086
106025
  var curKeyRoute = keyRoute ? keyRoute + '-unit' : 'unit';
106087
106026
  updateFormValueData(curKeyRoute, Number(value)); // 更新单位数值
106088
106027
  };
@@ -106112,12 +106051,17 @@ styles.join("\\n")
106112
106051
  };
106113
106052
  _proto.render = function render() {
106114
106053
  var _this$props2 = this.props,
106115
- keyRoute = _this$props2.keyRoute,
106116
- jsonKey = _this$props2.jsonKey,
106117
- nodeKey = _this$props2.nodeKey,
106118
- targetJsonSchema = _this$props2.targetJsonSchema,
106119
- pageScreen = _this$props2.pageScreen,
106120
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
106054
+ schemaStore = _this$props2.schemaStore,
106055
+ jsonStore = _this$props2.jsonStore;
106056
+ var _ref2 = schemaStore || {},
106057
+ pageScreen = _ref2.pageScreen;
106058
+ var _ref3 = jsonStore || {},
106059
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
106060
+ var _this$props3 = this.props,
106061
+ keyRoute = _this$props3.keyRoute,
106062
+ jsonKey = _this$props3.jsonKey,
106063
+ nodeKey = _this$props3.nodeKey,
106064
+ targetJsonSchema = _this$props3.targetJsonSchema;
106121
106065
  // 从jsonData中获取对应的数值
106122
106066
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
106123
106067
  var readOnly = targetJsonSchema.readOnly || false; // 是否只读(默认可编辑)
@@ -106242,12 +106186,8 @@ styles.join("\\n")
106242
106186
  /* harmony default export */ __webpack_exports__['default'] = (0,
106243
106187
  mobx_react__WEBPACK_IMPORTED_MODULE_8__.inject)(function (stores) {
106244
106188
  return {
106245
- pageScreen: stores.JSONSchemaStore.pageScreen,
106246
- getJSONDataByKeyRoute:
106247
- stores.JSONEditorStore.getJSONDataByKeyRoute,
106248
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
106249
- getInitJsonDataByKeyRoute:
106250
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
106189
+ schemaStore: stores.JSONSchemaStore,
106190
+ jsonStore: stores.JSONEditorStore,
106251
106191
  };
106252
106192
  })(
106253
106193
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(
@@ -106317,10 +106257,12 @@ styles.join("\\n")
106317
106257
  // 这边绑定是必要的,这样 `this` 才能在回调函数中使用
106318
106258
  /** 数值变动事件处理器 */
106319
106259
  _this.handleValueChange = function (event) {
106320
- var value = event.target.value;
106321
106260
  var _this$props = _this.props,
106322
106261
  keyRoute = _this$props.keyRoute,
106323
- updateFormValueData = _this$props.updateFormValueData;
106262
+ jsonStore = _this$props.jsonStore;
106263
+ var _ref = jsonStore || {},
106264
+ updateFormValueData = _ref.updateFormValueData;
106265
+ var value = event.target.value;
106324
106266
  updateFormValueData(keyRoute, value); // 更新数值
106325
106267
  };
106326
106268
  _this.handleValueChange = _this.handleValueChange.bind(_this);
@@ -106349,12 +106291,17 @@ styles.join("\\n")
106349
106291
  };
106350
106292
  _proto.render = function render() {
106351
106293
  var _this$props2 = this.props,
106352
- nodeKey = _this$props2.nodeKey,
106353
- jsonKey = _this$props2.jsonKey,
106354
- keyRoute = _this$props2.keyRoute,
106355
- targetJsonSchema = _this$props2.targetJsonSchema,
106356
- pageScreen = _this$props2.pageScreen,
106357
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
106294
+ schemaStore = _this$props2.schemaStore,
106295
+ jsonStore = _this$props2.jsonStore;
106296
+ var _ref2 = schemaStore || {},
106297
+ pageScreen = _ref2.pageScreen;
106298
+ var _ref3 = jsonStore || {},
106299
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
106300
+ var _this$props3 = this.props,
106301
+ nodeKey = _this$props3.nodeKey,
106302
+ jsonKey = _this$props3.jsonKey,
106303
+ keyRoute = _this$props3.keyRoute,
106304
+ targetJsonSchema = _this$props3.targetJsonSchema;
106358
106305
  // 从jsonData中获取对应的数值
106359
106306
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
106360
106307
  var options = targetJsonSchema.options;
@@ -106482,12 +106429,8 @@ styles.join("\\n")
106482
106429
  /* harmony default export */ __webpack_exports__['default'] = (0,
106483
106430
  mobx_react__WEBPACK_IMPORTED_MODULE_8__.inject)(function (stores) {
106484
106431
  return {
106485
- pageScreen: stores.JSONSchemaStore.pageScreen,
106486
- getJSONDataByKeyRoute:
106487
- stores.JSONEditorStore.getJSONDataByKeyRoute,
106488
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
106489
- getInitJsonDataByKeyRoute:
106490
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
106432
+ schemaStore: stores.JSONSchemaStore,
106433
+ jsonStore: stores.JSONEditorStore,
106491
106434
  };
106492
106435
  })(
106493
106436
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(RadioSchema),
@@ -106639,14 +106582,19 @@ styles.join("\\n")
106639
106582
  _proto.render = function render() {
106640
106583
  var _this2 = this;
106641
106584
  var _this$props = this.props,
106642
- pageScreen = _this$props.pageScreen,
106643
- curConfigData = _this$props.curConfigData,
106644
- nodeKey = _this$props.nodeKey,
106645
- keyRoute = _this$props.keyRoute,
106646
- dynamicDataList = _this$props.dynamicDataList,
106647
- dynamicDataObj = _this$props.dynamicDataObj,
106648
- dynamicDataApiScopeList = _this$props.dynamicDataApiScopeList,
106649
- getJSONDataByKeyRoute = _this$props.getJSONDataByKeyRoute;
106585
+ schemaStore = _this$props.schemaStore,
106586
+ jsonStore = _this$props.jsonStore;
106587
+ var _ref = schemaStore || {},
106588
+ pageScreen = _ref.pageScreen;
106589
+ var _ref2 = jsonStore || {},
106590
+ getJSONDataByKeyRoute = _ref2.getJSONDataByKeyRoute,
106591
+ dynamicDataApiScopeList = _ref2.dynamicDataApiScopeList,
106592
+ dynamicDataList = _ref2.dynamicDataList,
106593
+ dynamicDataObj = _ref2.dynamicDataObj;
106594
+ var _this$props2 = this.props,
106595
+ curConfigData = _this$props2.curConfigData,
106596
+ nodeKey = _this$props2.nodeKey,
106597
+ keyRoute = _this$props2.keyRoute;
106650
106598
  // 从jsonData中获取对应的数值
106651
106599
  var curJsonData = getJSONDataByKeyRoute(keyRoute) || {};
106652
106600
  var dataName = curConfigData.dataName; // 数据源名称
@@ -106906,13 +106854,8 @@ styles.join("\\n")
106906
106854
  /* harmony default export */ __webpack_exports__['default'] = (0,
106907
106855
  mobx_react__WEBPACK_IMPORTED_MODULE_12__.inject)(function (stores) {
106908
106856
  return {
106909
- pageScreen: stores.JSONSchemaStore.pageScreen,
106910
- dynamicDataList: stores.JSONEditorStore.dynamicDataList,
106911
- dynamicDataObj: stores.JSONEditorStore.dynamicDataObj,
106912
- dynamicDataApiScopeList:
106913
- stores.JSONEditorStore.dynamicDataApiScopeList,
106914
- getJSONDataByKeyRoute:
106915
- stores.JSONEditorStore.getJSONDataByKeyRoute,
106857
+ schemaStore: stores.JSONSchemaStore,
106858
+ jsonStore: stores.JSONEditorStore,
106916
106859
  };
106917
106860
  })(
106918
106861
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_12__.observer)(
@@ -106999,7 +106942,9 @@ styles.join("\\n")
106999
106942
  _this.handleValueChange = function (value) {
107000
106943
  var _this$props = _this.props,
107001
106944
  keyRoute = _this$props.keyRoute,
107002
- updateFormValueData = _this$props.updateFormValueData;
106945
+ jsonStore = _this$props.jsonStore;
106946
+ var _ref = jsonStore || {},
106947
+ updateFormValueData = _ref.updateFormValueData;
107003
106948
  updateFormValueData(keyRoute, value); // 更新数值
107004
106949
  };
107005
106950
  _this.handleValueChange = _this.handleValueChange.bind(_this);
@@ -107028,12 +106973,17 @@ styles.join("\\n")
107028
106973
  };
107029
106974
  _proto.render = function render() {
107030
106975
  var _this$props2 = this.props,
107031
- nodeKey = _this$props2.nodeKey,
107032
- jsonKey = _this$props2.jsonKey,
107033
- keyRoute = _this$props2.keyRoute,
107034
- targetJsonSchema = _this$props2.targetJsonSchema,
107035
- pageScreen = _this$props2.pageScreen,
107036
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
106976
+ schemaStore = _this$props2.schemaStore,
106977
+ jsonStore = _this$props2.jsonStore;
106978
+ var _ref2 = schemaStore || {},
106979
+ pageScreen = _ref2.pageScreen;
106980
+ var _ref3 = jsonStore || {},
106981
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
106982
+ var _this$props3 = this.props,
106983
+ nodeKey = _this$props3.nodeKey,
106984
+ jsonKey = _this$props3.jsonKey,
106985
+ keyRoute = _this$props3.keyRoute,
106986
+ targetJsonSchema = _this$props3.targetJsonSchema;
107037
106987
  // 从jsonData中获取对应的数值
107038
106988
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
107039
106989
  var options = targetJsonSchema.options;
@@ -107173,12 +107123,8 @@ styles.join("\\n")
107173
107123
  /* harmony default export */ __webpack_exports__['default'] = (0,
107174
107124
  mobx_react__WEBPACK_IMPORTED_MODULE_10__.inject)(function (stores) {
107175
107125
  return {
107176
- pageScreen: stores.JSONSchemaStore.pageScreen,
107177
- getJSONDataByKeyRoute:
107178
- stores.JSONEditorStore.getJSONDataByKeyRoute,
107179
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
107180
- getInitJsonDataByKeyRoute:
107181
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
107126
+ schemaStore: stores.JSONSchemaStore,
107127
+ jsonStore: stores.JSONEditorStore,
107182
107128
  };
107183
107129
  })(
107184
107130
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer)(
@@ -107210,7 +107156,7 @@ styles.join("\\n")
107210
107156
  /*#__PURE__*/ __webpack_require__.n(
107211
107157
  react__WEBPACK_IMPORTED_MODULE_1__,
107212
107158
  );
107213
- /* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_9__ =
107159
+ /* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_10__ =
107214
107160
  __webpack_require__(
107215
107161
  /*! mobx-react */ '../../node_modules/mobx-react/dist/mobxreact.esm.js',
107216
107162
  );
@@ -107218,19 +107164,19 @@ styles.join("\\n")
107218
107164
  __webpack_require__(
107219
107165
  /*! mobx */ '../../node_modules/mobx/lib/mobx.module.js',
107220
107166
  );
107221
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ =
107167
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ =
107222
107168
  __webpack_require__(
107223
107169
  /*! prop-types */ '../../node_modules/prop-types/index.js',
107224
107170
  );
107225
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default =
107171
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default =
107226
107172
  /*#__PURE__*/ __webpack_require__.n(
107227
- prop_types__WEBPACK_IMPORTED_MODULE_8__,
107173
+ prop_types__WEBPACK_IMPORTED_MODULE_9__,
107228
107174
  );
107229
107175
  /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ =
107230
107176
  __webpack_require__(
107231
107177
  /*! antd */ '../../node_modules/antd/es/collapse/index.js',
107232
107178
  );
107233
- /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ =
107179
+ /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ =
107234
107180
  __webpack_require__(
107235
107181
  /*! antd */ '../../node_modules/antd/es/tooltip/index.js',
107236
107182
  );
@@ -107244,6 +107190,10 @@ styles.join("\\n")
107244
107190
  );
107245
107191
  /* harmony import */ var $mixins_index__WEBPACK_IMPORTED_MODULE_6__ =
107246
107192
  __webpack_require__(/*! $mixins/index */ './src/mixins/index.js');
107193
+ /* harmony import */ var $utils_webCache__WEBPACK_IMPORTED_MODULE_7__ =
107194
+ __webpack_require__(
107195
+ /*! $utils/webCache */ './src/utils/webCache.js',
107196
+ );
107247
107197
 
107248
107198
  var Panel = antd__WEBPACK_IMPORTED_MODULE_3__['default'].Panel;
107249
107199
 
@@ -107258,6 +107208,7 @@ styles.join("\\n")
107258
107208
  // 是否显示code模式
107259
107209
  isClosed: false, // 是否为关闭状态,默认是开启状态
107260
107210
  };
107211
+ _this.collapseChange = _this.collapseChange.bind(_this);
107261
107212
  return _this;
107262
107213
  }
107263
107214
  (0,
@@ -107281,17 +107232,42 @@ styles.join("\\n")
107281
107232
  );
107282
107233
  }
107283
107234
  };
107235
+ _proto.collapseChange = function collapseChange(collapseData) {
107236
+ var keyRoute = this.props.keyRoute;
107237
+ // 缓存当前折叠状态
107238
+ (0,
107239
+ $utils_webCache__WEBPACK_IMPORTED_MODULE_7__.saveJSONEditorCache)(
107240
+ keyRoute,
107241
+ collapseData,
107242
+ );
107243
+ };
107284
107244
  _proto.render = function render() {
107285
107245
  var _this$props = this.props,
107286
- indexRoute = _this$props.indexRoute,
107287
- jsonKey = _this$props.jsonKey,
107288
- nodeKey = _this$props.nodeKey,
107289
- keyRoute = _this$props.keyRoute,
107290
- pageScreen = _this$props.pageScreen,
107291
- targetJsonSchema = _this$props.targetJsonSchema,
107292
- getJSONDataByKeyRoute = _this$props.getJSONDataByKeyRoute,
107293
- keyRoute2indexRoute = _this$props.keyRoute2indexRoute,
107294
- updateFormValueData = _this$props.updateFormValueData;
107246
+ schemaStore = _this$props.schemaStore,
107247
+ jsonStore = _this$props.jsonStore;
107248
+ var _ref = schemaStore || {},
107249
+ pageScreen = _ref.pageScreen;
107250
+ // const { getJSONDataByKeyRoute } = jsonStore || {};
107251
+ var _this$props2 = this.props,
107252
+ indexRoute = _this$props2.indexRoute,
107253
+ jsonKey = _this$props2.jsonKey,
107254
+ nodeKey = _this$props2.nodeKey,
107255
+ keyRoute = _this$props2.keyRoute,
107256
+ targetJsonSchema = _this$props2.targetJsonSchema;
107257
+ // 获取前端缓存中的折叠数据
107258
+ var collapseData = ['mainConfig'];
107259
+ var collapseCacheData = (0,
107260
+ $utils_webCache__WEBPACK_IMPORTED_MODULE_7__.getJSONEditorCache)(
107261
+ keyRoute,
107262
+ );
107263
+ if (
107264
+ collapseCacheData &&
107265
+ (0, _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_4__.isArray)(
107266
+ collapseCacheData,
107267
+ )
107268
+ ) {
107269
+ collapseData = collapseCacheData;
107270
+ }
107295
107271
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107296
107272
  'div',
107297
107273
  {
@@ -107300,7 +107276,7 @@ styles.join("\\n")
107300
107276
  (pageScreen === 'wideScreen'
107301
107277
  ? 'wide-screen-element-warp'
107302
107278
  : 'mobile-screen-element-warp'),
107303
- key: nodeKey,
107279
+ // key={nodeKey}
107304
107280
  id: nodeKey,
107305
107281
  },
107306
107282
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
@@ -107309,7 +107285,7 @@ styles.join("\\n")
107309
107285
  className: 'element-title',
107310
107286
  },
107311
107287
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107312
- antd__WEBPACK_IMPORTED_MODULE_7__['default'],
107288
+ antd__WEBPACK_IMPORTED_MODULE_8__['default'],
107313
107289
  {
107314
107290
  title: targetJsonSchema.description,
107315
107291
  placement: 'top',
@@ -107350,93 +107326,13 @@ styles.join("\\n")
107350
107326
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107351
107327
  antd__WEBPACK_IMPORTED_MODULE_3__['default'],
107352
107328
  {
107353
- defaultActiveKey: ['mainConfig'],
107329
+ defaultActiveKey: collapseData,
107354
107330
  expandIconPosition: 'right',
107355
107331
  bordered: false,
107356
107332
  accordion: true,
107333
+ onChange: this.collapseChange,
107357
107334
  },
107358
- targetJsonSchema.properties['mainConfig'] &&
107359
- /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107360
- Panel,
107361
- {
107362
- header:
107363
- targetJsonSchema.properties['mainConfig'].title,
107364
- key: 'mainConfig',
107365
- },
107366
- targetJsonSchema.properties[
107367
- 'mainConfig'
107368
- ].propertyOrder.map(function (key, index) {
107369
- /** 1. 获取当前元素的路径值 */
107370
- var currentIndexRoute = indexRoute
107371
- ? indexRoute + '-0-' + index
107372
- : '0-' + index;
107373
- var currentKeyRoute = keyRoute
107374
- ? keyRoute + '-mainConfig-' + key
107375
- : 'mainConfig-' + key; // key路径值,后续用于从jsonData中提取当前元素的数值
107376
- var mainConfigJsonData =
107377
- getJSONDataByKeyRoute(
107378
- keyRoute
107379
- ? keyRoute + '-mainConfig'
107380
- : 'mainConfig',
107381
- ) || {};
107382
- /** 2. 获取当前元素的key值 */
107383
- var currentJsonKey = key;
107384
- /** 3. 获取当前元素的json结构对象 */
107385
- var currentSchemaData = (0,
107386
- mobx__WEBPACK_IMPORTED_MODULE_2__.toJS)(
107387
- targetJsonSchema.properties['mainConfig']
107388
- .properties[currentJsonKey],
107389
- );
107390
- /** 4. 判断是否是容器类型元素,如果是则禁止选中 */
107391
- var curType = currentSchemaData.type;
107392
- /** 5. 获取当前元素的id,用于做唯一标识 */
107393
- var childNodeKey =
107394
- nodeKey + '-' + curType + '-' + currentJsonKey;
107395
- var visibleOn = [
107396
- 'description',
107397
- 'CONTENTID',
107398
- 'CONTENTTYPE',
107399
- ].includes(currentJsonKey)
107400
- ? false
107401
- : true; // 是否显示当前元素
107402
-
107403
- // 补充动态配置类型相关显隐逻辑【定制逻辑】
107404
- if (
107405
- currentJsonKey === 'description' &&
107406
- mainConfigJsonData.type === 'ContentStaticConfig'
107407
- ) {
107408
- // mp后台配置 时显示 description(属性名称)
107409
- visibleOn = true;
107410
- } else if (
107411
- (currentJsonKey === 'CONTENTID' ||
107412
- currentJsonKey === 'CONTENTTYPE') &&
107413
- mainConfigJsonData.type === 'RuntimeDataSelfDefine'
107414
- ) {
107415
- visibleOn = true;
107416
- }
107417
- if (visibleOn) {
107418
- return (0,
107419
- $components_MappingRender__WEBPACK_IMPORTED_MODULE_5__[
107420
- 'default'
107421
- ])({
107422
- parentType: curType,
107423
- jsonKey: currentJsonKey,
107424
- indexRoute: currentIndexRoute,
107425
- keyRoute: currentKeyRoute,
107426
- nodeKey: childNodeKey,
107427
- targetJsonSchema: currentSchemaData,
107428
- isArrayItem: true,
107429
- getJSONDataByKeyRoute: getJSONDataByKeyRoute,
107430
- keyRoute2indexRoute: keyRoute2indexRoute,
107431
- updateFormValueData: updateFormValueData,
107432
- });
107433
- }
107434
- }),
107435
- ),
107436
107335
  targetJsonSchema.propertyOrder.map(function (key, index) {
107437
- if (key === 'mainConfig') {
107438
- return;
107439
- }
107440
107336
  /** 1. 获取当前元素的路径值 */
107441
107337
  var currentIndexRoute = indexRoute
107442
107338
  ? indexRoute + '-' + index
@@ -107477,9 +107373,8 @@ styles.join("\\n")
107477
107373
  nodeKey: childNodeKey,
107478
107374
  targetJsonSchema: currentSchemaData,
107479
107375
  isArrayItem: true,
107480
- getJSONDataByKeyRoute: getJSONDataByKeyRoute,
107481
- keyRoute2indexRoute: keyRoute2indexRoute,
107482
- updateFormValueData: updateFormValueData,
107376
+ schemaStore: schemaStore,
107377
+ jsonStore: jsonStore,
107483
107378
  }),
107484
107379
  );
107485
107380
  }
@@ -107491,31 +107386,27 @@ styles.join("\\n")
107491
107386
  return SohuDataSourceSchema;
107492
107387
  })(react__WEBPACK_IMPORTED_MODULE_1___default().PureComponent);
107493
107388
  SohuDataSourceSchema.propTypes = {
107494
- isArrayItem: prop_types__WEBPACK_IMPORTED_MODULE_8___default().any,
107389
+ isArrayItem: prop_types__WEBPACK_IMPORTED_MODULE_9___default().any,
107495
107390
  // 如果是数组项,title会进行特殊显示
107496
107391
  parentType:
107497
- prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,
107498
- jsonKey: prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,
107499
- indexRoute: prop_types__WEBPACK_IMPORTED_MODULE_8___default().any,
107500
- keyRoute: prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,
107501
- nodeKey: prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,
107392
+ prop_types__WEBPACK_IMPORTED_MODULE_9___default().string,
107393
+ jsonKey: prop_types__WEBPACK_IMPORTED_MODULE_9___default().string,
107394
+ indexRoute: prop_types__WEBPACK_IMPORTED_MODULE_9___default().any,
107395
+ keyRoute: prop_types__WEBPACK_IMPORTED_MODULE_9___default().string,
107396
+ nodeKey: prop_types__WEBPACK_IMPORTED_MODULE_9___default().string,
107502
107397
  targetJsonSchema:
107503
- prop_types__WEBPACK_IMPORTED_MODULE_8___default().any,
107398
+ prop_types__WEBPACK_IMPORTED_MODULE_9___default().any,
107504
107399
  isStructuredSchema:
107505
- prop_types__WEBPACK_IMPORTED_MODULE_8___default().bool,
107400
+ prop_types__WEBPACK_IMPORTED_MODULE_9___default().bool,
107506
107401
  };
107507
107402
  /* harmony default export */ __webpack_exports__['default'] = (0,
107508
- mobx_react__WEBPACK_IMPORTED_MODULE_9__.inject)(function (stores) {
107403
+ mobx_react__WEBPACK_IMPORTED_MODULE_10__.inject)(function (stores) {
107509
107404
  return {
107510
- pageScreen: stores.JSONSchemaStore.pageScreen,
107511
- getJSONDataByKeyRoute:
107512
- stores.JSONEditorStore.getJSONDataByKeyRoute,
107513
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
107514
- getInitJsonDataByKeyRoute:
107515
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
107405
+ schemaStore: stores.JSONSchemaStore,
107406
+ jsonStore: stores.JSONEditorStore,
107516
107407
  };
107517
107408
  })(
107518
- (0, mobx_react__WEBPACK_IMPORTED_MODULE_9__.observer)(
107409
+ (0, mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer)(
107519
107410
  SohuDataSourceSchema,
107520
107411
  ),
107521
107412
  );
@@ -107544,7 +107435,7 @@ styles.join("\\n")
107544
107435
  /*#__PURE__*/ __webpack_require__.n(
107545
107436
  react__WEBPACK_IMPORTED_MODULE_1__,
107546
107437
  );
107547
- /* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_12__ =
107438
+ /* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_13__ =
107548
107439
  __webpack_require__(
107549
107440
  /*! mobx-react */ '../../node_modules/mobx-react/dist/mobxreact.esm.js',
107550
107441
  );
@@ -107552,13 +107443,13 @@ styles.join("\\n")
107552
107443
  __webpack_require__(
107553
107444
  /*! mobx */ '../../node_modules/mobx/lib/mobx.module.js',
107554
107445
  );
107555
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ =
107446
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12__ =
107556
107447
  __webpack_require__(
107557
107448
  /*! prop-types */ '../../node_modules/prop-types/index.js',
107558
107449
  );
107559
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default =
107450
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12___default =
107560
107451
  /*#__PURE__*/ __webpack_require__.n(
107561
- prop_types__WEBPACK_IMPORTED_MODULE_11__,
107452
+ prop_types__WEBPACK_IMPORTED_MODULE_12__,
107562
107453
  );
107563
107454
  /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ =
107564
107455
  __webpack_require__(
@@ -107568,15 +107459,15 @@ styles.join("\\n")
107568
107459
  __webpack_require__(
107569
107460
  /*! antd */ '../../node_modules/antd/es/collapse/index.js',
107570
107461
  );
107571
- /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ =
107462
+ /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ =
107572
107463
  __webpack_require__(
107573
107464
  /*! antd */ '../../node_modules/antd/es/input/index.js',
107574
107465
  );
107575
- /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ =
107466
+ /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_10__ =
107576
107467
  __webpack_require__(
107577
107468
  /*! antd */ '../../node_modules/antd/es/list/index.js',
107578
107469
  );
107579
- /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_10__ =
107470
+ /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_11__ =
107580
107471
  __webpack_require__(
107581
107472
  /*! antd */ '../../node_modules/antd/es/empty/index.js',
107582
107473
  );
@@ -107586,13 +107477,17 @@ styles.join("\\n")
107586
107477
  );
107587
107478
  /* harmony import */ var $mixins_index__WEBPACK_IMPORTED_MODULE_6__ =
107588
107479
  __webpack_require__(/*! $mixins/index */ './src/mixins/index.js');
107589
- /* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_7__ =
107480
+ /* harmony import */ var $utils_webCache__WEBPACK_IMPORTED_MODULE_7__ =
107481
+ __webpack_require__(
107482
+ /*! $utils/webCache */ './src/utils/webCache.js',
107483
+ );
107484
+ /* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_8__ =
107590
107485
  __webpack_require__(
107591
107486
  /*! ./index.scss */ './src/renderers/SohuEventSchema/index.scss',
107592
107487
  );
107593
- /* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_7___default =
107488
+ /* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_8___default =
107594
107489
  /*#__PURE__*/ __webpack_require__.n(
107595
- _index_scss__WEBPACK_IMPORTED_MODULE_7__,
107490
+ _index_scss__WEBPACK_IMPORTED_MODULE_8__,
107596
107491
  );
107597
107492
 
107598
107493
  var Option = antd__WEBPACK_IMPORTED_MODULE_3__['default'].Option;
@@ -107603,11 +107498,14 @@ styles.join("\\n")
107603
107498
  var _this;
107604
107499
  _this = _React$PureComponent.call(this, props) || this;
107605
107500
  _this.handleEventTitleChange = function (eventCode, inputEvent) {
107606
- var newTitle = inputEvent.target.value;
107607
107501
  var _this$props = _this.props,
107608
107502
  keyRoute = _this$props.keyRoute,
107609
- updateFormValueData = _this$props.updateFormValueData,
107610
- getJSONDataByKeyRoute = _this$props.getJSONDataByKeyRoute;
107503
+ jsonStore = _this$props.jsonStore;
107504
+ var _ref = jsonStore || {},
107505
+ updateFormValueData = _ref.updateFormValueData,
107506
+ getJSONDataByKeyRoute = _ref.getJSONDataByKeyRoute,
107507
+ _options = _ref.options;
107508
+ var newTitle = inputEvent.target.value;
107611
107509
  var curJsonData = getJSONDataByKeyRoute(keyRoute) || {};
107612
107510
  var globalEventMap = Object.assign(
107613
107511
  {},
@@ -107625,9 +107523,12 @@ styles.join("\\n")
107625
107523
  ) {
107626
107524
  var _this$props2 = _this.props,
107627
107525
  keyRoute = _this$props2.keyRoute,
107628
- updateFormValueData = _this$props2.updateFormValueData,
107629
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
107630
- var options = _this.props.options || {};
107526
+ jsonStore = _this$props2.jsonStore;
107527
+ var _ref2 = jsonStore || {},
107528
+ updateFormValueData = _ref2.updateFormValueData,
107529
+ getJSONDataByKeyRoute = _ref2.getJSONDataByKeyRoute,
107530
+ _options = _ref2.options;
107531
+ var options = _options || {};
107631
107532
  var curKeyRout = keyRoute + '-event';
107632
107533
  var curJsonData = getJSONDataByKeyRoute(keyRoute) || {};
107633
107534
  var curEvent = [];
@@ -107660,6 +107561,7 @@ styles.join("\\n")
107660
107561
  // 是否显示code模式
107661
107562
  isClosed: false, // 是否为关闭状态,默认是开启状态
107662
107563
  };
107564
+ _this.collapseChange = _this.collapseChange.bind(_this);
107663
107565
  return _this;
107664
107566
  }
107665
107567
  (0,
@@ -107683,19 +107585,32 @@ styles.join("\\n")
107683
107585
  );
107684
107586
  }
107685
107587
  };
107588
+ _proto.collapseChange = function collapseChange(collapseData) {
107589
+ var keyRoute = this.props.keyRoute;
107590
+ // 缓存当前折叠状态
107591
+ (0,
107592
+ $utils_webCache__WEBPACK_IMPORTED_MODULE_7__.saveJSONEditorCache)(
107593
+ keyRoute,
107594
+ collapseData,
107595
+ );
107596
+ };
107686
107597
  _proto.render = function render() {
107687
107598
  var _this2 = this;
107688
107599
  var _this$props3 = this.props,
107689
- indexRoute = _this$props3.indexRoute,
107690
- jsonKey = _this$props3.jsonKey,
107691
- nodeKey = _this$props3.nodeKey,
107692
- keyRoute = _this$props3.keyRoute,
107693
- pageScreen = _this$props3.pageScreen,
107694
- targetJsonSchema = _this$props3.targetJsonSchema,
107695
- getJSONDataByKeyRoute = _this$props3.getJSONDataByKeyRoute,
107696
- keyRoute2indexRoute = _this$props3.keyRoute2indexRoute,
107697
- updateFormValueData = _this$props3.updateFormValueData;
107698
- var options = this.props.options || {};
107600
+ schemaStore = _this$props3.schemaStore,
107601
+ jsonStore = _this$props3.jsonStore;
107602
+ var _ref3 = schemaStore || {},
107603
+ pageScreen = _ref3.pageScreen;
107604
+ var _ref4 = jsonStore || {},
107605
+ getJSONDataByKeyRoute = _ref4.getJSONDataByKeyRoute,
107606
+ _options = _ref4.options;
107607
+ var _this$props4 = this.props,
107608
+ indexRoute = _this$props4.indexRoute,
107609
+ jsonKey = _this$props4.jsonKey,
107610
+ nodeKey = _this$props4.nodeKey,
107611
+ keyRoute = _this$props4.keyRoute,
107612
+ targetJsonSchema = _this$props4.targetJsonSchema;
107613
+ var options = options || {};
107699
107614
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
107700
107615
  var globalEventMap = curJsonData.globalEventMap || {}; // 全局事件列表
107701
107616
  var curEventList = curJsonData.event || []; // 当前组件事件列表
@@ -107709,6 +107624,21 @@ styles.join("\\n")
107709
107624
  widgetType !== 'page' &&
107710
107625
  eventEmitConfig.length === 0 &&
107711
107626
  eventListenConfig.length === 0;
107627
+
107628
+ // 获取前端缓存中的折叠数据
107629
+ var collapseData = [];
107630
+ var collapseCacheData = (0,
107631
+ $utils_webCache__WEBPACK_IMPORTED_MODULE_7__.getJSONEditorCache)(
107632
+ keyRoute,
107633
+ );
107634
+ if (
107635
+ collapseCacheData &&
107636
+ (0, _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_5__.isArray)(
107637
+ collapseCacheData,
107638
+ )
107639
+ ) {
107640
+ collapseData = collapseCacheData;
107641
+ }
107712
107642
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107713
107643
  'div',
107714
107644
  {
@@ -107723,9 +107653,10 @@ styles.join("\\n")
107723
107653
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107724
107654
  antd__WEBPACK_IMPORTED_MODULE_4__['default'],
107725
107655
  {
107726
- defaultActiveKey: ['mainConfig'],
107656
+ defaultActiveKey: collapseData,
107727
107657
  expandIconPosition: 'right',
107728
107658
  bordered: false,
107659
+ onChange: this.collapseChange,
107729
107660
  // accordion
107730
107661
  },
107731
107662
  eventListenConfig &&
@@ -107880,7 +107811,7 @@ styles.join("\\n")
107880
107811
  className: 'form-item-box',
107881
107812
  },
107882
107813
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107883
- antd__WEBPACK_IMPORTED_MODULE_8__['default'],
107814
+ antd__WEBPACK_IMPORTED_MODULE_9__['default'],
107884
107815
  {
107885
107816
  style: {
107886
107817
  display: 'inline-block',
@@ -107916,16 +107847,17 @@ styles.join("\\n")
107916
107847
  key: 'AllEmitEventList',
107917
107848
  },
107918
107849
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107919
- antd__WEBPACK_IMPORTED_MODULE_9__['default'],
107850
+ antd__WEBPACK_IMPORTED_MODULE_10__['default'],
107920
107851
  {
107921
107852
  itemLayout: 'horizontal',
107922
107853
  dataSource: allEmitEventList,
107923
107854
  renderItem: function renderItem(event, index) {
107924
107855
  return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107925
- antd__WEBPACK_IMPORTED_MODULE_9__['default'].Item,
107856
+ antd__WEBPACK_IMPORTED_MODULE_10__['default']
107857
+ .Item,
107926
107858
  null,
107927
107859
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107928
- antd__WEBPACK_IMPORTED_MODULE_9__['default']
107860
+ antd__WEBPACK_IMPORTED_MODULE_10__['default']
107929
107861
  .Item.Meta,
107930
107862
  {
107931
107863
  title:
@@ -107949,7 +107881,7 @@ styles.join("\\n")
107949
107881
  ),
107950
107882
  isEmpty &&
107951
107883
  /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
107952
- antd__WEBPACK_IMPORTED_MODULE_10__['default'],
107884
+ antd__WEBPACK_IMPORTED_MODULE_11__['default'],
107953
107885
  {
107954
107886
  description: '暂无事件相关数据',
107955
107887
  },
@@ -107959,32 +107891,27 @@ styles.join("\\n")
107959
107891
  return SohuEventSchema;
107960
107892
  })(react__WEBPACK_IMPORTED_MODULE_1___default().PureComponent);
107961
107893
  SohuEventSchema.propTypes = {
107962
- isArrayItem: prop_types__WEBPACK_IMPORTED_MODULE_11___default().any,
107894
+ isArrayItem: prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
107963
107895
  // 如果是数组项,title会进行特殊显示
107964
107896
  parentType:
107965
- prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,
107966
- jsonKey: prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,
107967
- indexRoute: prop_types__WEBPACK_IMPORTED_MODULE_11___default().any,
107968
- keyRoute: prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,
107969
- nodeKey: prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,
107897
+ prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
107898
+ jsonKey: prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
107899
+ indexRoute: prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
107900
+ keyRoute: prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
107901
+ nodeKey: prop_types__WEBPACK_IMPORTED_MODULE_12___default().string,
107970
107902
  targetJsonSchema:
107971
- prop_types__WEBPACK_IMPORTED_MODULE_11___default().any,
107903
+ prop_types__WEBPACK_IMPORTED_MODULE_12___default().any,
107972
107904
  isStructuredSchema:
107973
- prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool,
107905
+ prop_types__WEBPACK_IMPORTED_MODULE_12___default().bool,
107974
107906
  };
107975
107907
  /* harmony default export */ __webpack_exports__['default'] = (0,
107976
- mobx_react__WEBPACK_IMPORTED_MODULE_12__.inject)(function (stores) {
107908
+ mobx_react__WEBPACK_IMPORTED_MODULE_13__.inject)(function (stores) {
107977
107909
  return {
107978
- pageScreen: stores.JSONSchemaStore.pageScreen,
107979
- options: stores.JSONEditorStore.options,
107980
- getJSONDataByKeyRoute:
107981
- stores.JSONEditorStore.getJSONDataByKeyRoute,
107982
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
107983
- getInitJsonDataByKeyRoute:
107984
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
107910
+ schemaStore: stores.JSONSchemaStore,
107911
+ jsonStore: stores.JSONEditorStore,
107985
107912
  };
107986
107913
  })(
107987
- (0, mobx_react__WEBPACK_IMPORTED_MODULE_12__.observer)(
107914
+ (0, mobx_react__WEBPACK_IMPORTED_MODULE_13__.observer)(
107988
107915
  SohuEventSchema,
107989
107916
  ),
107990
107917
  );
@@ -108055,10 +107982,12 @@ styles.join("\\n")
108055
107982
  // 这边绑定是必要的,这样 `this` 才能在回调函数中使用
108056
107983
  /** 数值变动事件处理器 */
108057
107984
  _this.handleValueChange = function (event) {
108058
- var value = event.target.value;
108059
107985
  var _this$props = _this.props,
108060
107986
  keyRoute = _this$props.keyRoute,
108061
- updateFormValueData = _this$props.updateFormValueData;
107987
+ jsonStore = _this$props.jsonStore;
107988
+ var _ref = jsonStore || {},
107989
+ updateFormValueData = _ref.updateFormValueData;
107990
+ var value = event.target.value;
108062
107991
  updateFormValueData(keyRoute, value); // 更新数值
108063
107992
  };
108064
107993
  _this.handleValueChange = _this.handleValueChange.bind(_this);
@@ -108087,12 +108016,17 @@ styles.join("\\n")
108087
108016
  };
108088
108017
  _proto.render = function render() {
108089
108018
  var _this$props2 = this.props,
108090
- keyRoute = _this$props2.keyRoute,
108091
- jsonKey = _this$props2.jsonKey,
108092
- nodeKey = _this$props2.nodeKey,
108093
- targetJsonSchema = _this$props2.targetJsonSchema,
108094
- pageScreen = _this$props2.pageScreen,
108095
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
108019
+ schemaStore = _this$props2.schemaStore,
108020
+ jsonStore = _this$props2.jsonStore;
108021
+ var _ref2 = schemaStore || {},
108022
+ pageScreen = _ref2.pageScreen;
108023
+ var _ref3 = jsonStore || {},
108024
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
108025
+ var _this$props3 = this.props,
108026
+ keyRoute = _this$props3.keyRoute,
108027
+ jsonKey = _this$props3.jsonKey,
108028
+ nodeKey = _this$props3.nodeKey,
108029
+ targetJsonSchema = _this$props3.targetJsonSchema;
108096
108030
  // 从jsonData中获取对应的数值
108097
108031
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
108098
108032
  var readOnly = targetJsonSchema.readOnly || false; // 是否只读(默认可编辑)
@@ -108222,12 +108156,8 @@ styles.join("\\n")
108222
108156
  /* harmony default export */ __webpack_exports__['default'] = (0,
108223
108157
  mobx_react__WEBPACK_IMPORTED_MODULE_8__.inject)(function (stores) {
108224
108158
  return {
108225
- pageScreen: stores.JSONSchemaStore.pageScreen,
108226
- getJSONDataByKeyRoute:
108227
- stores.JSONEditorStore.getJSONDataByKeyRoute,
108228
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
108229
- getInitJsonDataByKeyRoute:
108230
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
108159
+ schemaStore: stores.JSONSchemaStore,
108160
+ jsonStore: stores.JSONEditorStore,
108231
108161
  };
108232
108162
  })(
108233
108163
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(
@@ -108394,7 +108324,9 @@ styles.join("\\n")
108394
108324
  _this.handleEditorChange = function (editorState) {
108395
108325
  var _this$props = _this.props,
108396
108326
  keyRoute = _this$props.keyRoute,
108397
- updateFormValueData = _this$props.updateFormValueData;
108327
+ jsonStore = _this$props.jsonStore;
108328
+ var _ref = jsonStore || {},
108329
+ updateFormValueData = _ref.updateFormValueData;
108398
108330
  updateFormValueData(keyRoute, editorState.toHTML()); // 更新数值
108399
108331
  };
108400
108332
  _this.state = {
@@ -108456,14 +108388,13 @@ styles.join("\\n")
108456
108388
  ])(TextEditorSchema, _React$PureComponent);
108457
108389
  var _proto = TextEditorSchema.prototype;
108458
108390
  _proto.componentWillMount = function componentWillMount() {
108391
+ var _ref2 = this.props.schemaStore || {},
108392
+ pageScreen = _ref2.pageScreen;
108459
108393
  // 从web缓存中获取数值
108460
108394
  $mixins_index__WEBPACK_IMPORTED_MODULE_3__.catchJsonDataByWebCache.call(
108461
108395
  this,
108462
108396
  );
108463
- if (
108464
- this.props.pageScreen &&
108465
- this.props.pageScreen === 'wideScreen'
108466
- ) {
108397
+ if (pageScreen && pageScreen === 'wideScreen') {
108467
108398
  // 大屏幕时默认展开富文本编辑器
108468
108399
  this.setState({
108469
108400
  isClosed: false,
@@ -108478,10 +108409,13 @@ styles.join("\\n")
108478
108409
  this,
108479
108410
  nextProps.keyRoute,
108480
108411
  );
108481
- } else if (nextProps.pageScreen !== this.props.pageScreen) {
108412
+ } else if (
108413
+ nextProps.schemaStore.pageScreen !==
108414
+ this.props.schemaStore.pageScreen
108415
+ ) {
108482
108416
  if (
108483
- nextProps.pageScreen &&
108484
- nextProps.pageScreen === 'wideScreen'
108417
+ nextProps.schemaStore.pageScreen &&
108418
+ nextProps.schemaStore.pageScreen === 'wideScreen'
108485
108419
  ) {
108486
108420
  // 大屏幕时默认展开富文本编辑器
108487
108421
  this.setState({
@@ -108493,12 +108427,17 @@ styles.join("\\n")
108493
108427
  _proto.render = function render() {
108494
108428
  var _this2 = this;
108495
108429
  var _this$props2 = this.props,
108496
- keyRoute = _this$props2.keyRoute,
108497
- jsonKey = _this$props2.jsonKey,
108498
- nodeKey = _this$props2.nodeKey,
108499
- targetJsonSchema = _this$props2.targetJsonSchema,
108500
- pageScreen = _this$props2.pageScreen,
108501
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
108430
+ schemaStore = _this$props2.schemaStore,
108431
+ jsonStore = _this$props2.jsonStore;
108432
+ var _ref3 = schemaStore || {},
108433
+ pageScreen = _ref3.pageScreen;
108434
+ var _ref4 = jsonStore || {},
108435
+ getJSONDataByKeyRoute = _ref4.getJSONDataByKeyRoute;
108436
+ var _this$props3 = this.props,
108437
+ keyRoute = _this$props3.keyRoute,
108438
+ jsonKey = _this$props3.jsonKey,
108439
+ nodeKey = _this$props3.nodeKey,
108440
+ targetJsonSchema = _this$props3.targetJsonSchema;
108502
108441
  var isClosed = this.state.isClosed;
108503
108442
  var curJsonData = getJSONDataByKeyRoute(keyRoute); // 从jsonData中获取对应的html内容
108504
108443
  var editorState =
@@ -108656,12 +108595,8 @@ styles.join("\\n")
108656
108595
  /* harmony default export */ __webpack_exports__['default'] = (0,
108657
108596
  mobx_react__WEBPACK_IMPORTED_MODULE_16__.inject)(function (stores) {
108658
108597
  return {
108659
- pageScreen: stores.JSONSchemaStore.pageScreen,
108660
- getJSONDataByKeyRoute:
108661
- stores.JSONEditorStore.getJSONDataByKeyRoute,
108662
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
108663
- getInitJsonDataByKeyRoute:
108664
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
108598
+ schemaStore: stores.JSONSchemaStore,
108599
+ jsonStore: stores.JSONEditorStore,
108665
108600
  };
108666
108601
  })(
108667
108602
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_16__.observer)(
@@ -108739,7 +108674,9 @@ styles.join("\\n")
108739
108674
  _this.handleValueChange = function (event, dateString) {
108740
108675
  var _this$props = _this.props,
108741
108676
  keyRoute = _this$props.keyRoute,
108742
- updateFormValueData = _this$props.updateFormValueData;
108677
+ jsonStore = _this$props.jsonStore;
108678
+ var _ref = jsonStore || {},
108679
+ updateFormValueData = _ref.updateFormValueData;
108743
108680
  updateFormValueData(keyRoute, dateString); // 更新数值
108744
108681
  };
108745
108682
  _this.handleValueChange = _this.handleValueChange.bind(_this);
@@ -108768,12 +108705,17 @@ styles.join("\\n")
108768
108705
  };
108769
108706
  _proto.render = function render() {
108770
108707
  var _this$props2 = this.props,
108771
- nodeKey = _this$props2.nodeKey,
108772
- jsonKey = _this$props2.jsonKey,
108773
- keyRoute = _this$props2.keyRoute,
108774
- targetJsonSchema = _this$props2.targetJsonSchema,
108775
- pageScreen = _this$props2.pageScreen,
108776
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
108708
+ schemaStore = _this$props2.schemaStore,
108709
+ jsonStore = _this$props2.jsonStore;
108710
+ var _ref2 = schemaStore || {},
108711
+ pageScreen = _ref2.pageScreen;
108712
+ var _ref3 = jsonStore || {},
108713
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
108714
+ var _this$props3 = this.props,
108715
+ nodeKey = _this$props3.nodeKey,
108716
+ jsonKey = _this$props3.jsonKey,
108717
+ keyRoute = _this$props3.keyRoute,
108718
+ targetJsonSchema = _this$props3.targetJsonSchema;
108777
108719
  // 从jsonData中获取对应的数值
108778
108720
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
108779
108721
  var defaultTime = curJsonData || targetJsonSchema.default;
@@ -108891,12 +108833,8 @@ styles.join("\\n")
108891
108833
  /* harmony default export */ __webpack_exports__['default'] = (0,
108892
108834
  mobx_react__WEBPACK_IMPORTED_MODULE_9__.inject)(function (stores) {
108893
108835
  return {
108894
- pageScreen: stores.JSONSchemaStore.pageScreen,
108895
- getJSONDataByKeyRoute:
108896
- stores.JSONEditorStore.getJSONDataByKeyRoute,
108897
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
108898
- getInitJsonDataByKeyRoute:
108899
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
108836
+ schemaStore: stores.JSONSchemaStore,
108837
+ jsonStore: stores.JSONEditorStore,
108900
108838
  };
108901
108839
  })(
108902
108840
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_9__.observer)(
@@ -108962,11 +108900,17 @@ styles.join("\\n")
108962
108900
  var _proto = TreeSelectFromSchema.prototype;
108963
108901
  _proto.render = function render() {
108964
108902
  var _this$props = this.props,
108965
- pageScreen = _this$props.pageScreen,
108966
- mockData = _this$props.mockData,
108967
- dataRoute = _this$props.dataRoute,
108968
- nodeKey = _this$props.nodeKey,
108969
- onChange = _this$props.onChange;
108903
+ schemaStore = _this$props.schemaStore,
108904
+ jsonStore = _this$props.jsonStore;
108905
+ var _ref = schemaStore || {},
108906
+ pageScreen = _ref.pageScreen;
108907
+ var _ref2 = jsonStore || {},
108908
+ getJSONDataByKeyRoute = _ref2.getJSONDataByKeyRoute;
108909
+ var _this$props2 = this.props,
108910
+ mockData = _this$props2.mockData,
108911
+ dataRoute = _this$props2.dataRoute,
108912
+ nodeKey = _this$props2.nodeKey,
108913
+ onChange = _this$props2.onChange;
108970
108914
  var treeData = [];
108971
108915
  if (mockData && JSON.stringify(mockData) !== '{}') {
108972
108916
  var mockObj = mockData;
@@ -109036,7 +108980,6 @@ styles.join("\\n")
109036
108980
  return TreeSelectFromSchema;
109037
108981
  })(react__WEBPACK_IMPORTED_MODULE_1__.PureComponent);
109038
108982
  TreeSelectFromSchema.propTypes = {
109039
- pageScreen: prop_types__WEBPACK_IMPORTED_MODULE_4___default().any,
109040
108983
  mockData: prop_types__WEBPACK_IMPORTED_MODULE_4___default().any,
109041
108984
  // 接口mock数据
109042
108985
  dataRoute: prop_types__WEBPACK_IMPORTED_MODULE_4___default().any,
@@ -109048,7 +108991,7 @@ styles.join("\\n")
109048
108991
  /* harmony default export */ __webpack_exports__['default'] = (0,
109049
108992
  mobx_react__WEBPACK_IMPORTED_MODULE_5__.inject)(function (stores) {
109050
108993
  return {
109051
- pageScreen: stores.JSONSchemaStore.pageScreen,
108994
+ schemaStore: stores.JSONSchemaStore,
109052
108995
  };
109053
108996
  })(
109054
108997
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_5__.observer)(
@@ -109118,10 +109061,12 @@ styles.join("\\n")
109118
109061
  // 这边绑定是必要的,这样 `this` 才能在回调函数中使用
109119
109062
  /** 数值变动事件处理器 */
109120
109063
  _this.handleValueChange = function (event) {
109121
- var value = event.target.value;
109122
109064
  var _this$props = _this.props,
109123
109065
  keyRoute = _this$props.keyRoute,
109124
- updateFormValueData = _this$props.updateFormValueData;
109066
+ jsonStore = _this$props.jsonStore;
109067
+ var _ref = jsonStore || {},
109068
+ updateFormValueData = _ref.updateFormValueData;
109069
+ var value = event.target.value;
109125
109070
  updateFormValueData(keyRoute, value); // 更新数值
109126
109071
  };
109127
109072
  _this.handleValueChange = _this.handleValueChange.bind(_this);
@@ -109150,12 +109095,17 @@ styles.join("\\n")
109150
109095
  };
109151
109096
  _proto.render = function render() {
109152
109097
  var _this$props2 = this.props,
109153
- keyRoute = _this$props2.keyRoute,
109154
- jsonKey = _this$props2.jsonKey,
109155
- nodeKey = _this$props2.nodeKey,
109156
- targetJsonSchema = _this$props2.targetJsonSchema,
109157
- pageScreen = _this$props2.pageScreen,
109158
- getJSONDataByKeyRoute = _this$props2.getJSONDataByKeyRoute;
109098
+ schemaStore = _this$props2.schemaStore,
109099
+ jsonStore = _this$props2.jsonStore;
109100
+ var _ref2 = schemaStore || {},
109101
+ pageScreen = _ref2.pageScreen;
109102
+ var _ref3 = jsonStore || {},
109103
+ getJSONDataByKeyRoute = _ref3.getJSONDataByKeyRoute;
109104
+ var _this$props3 = this.props,
109105
+ keyRoute = _this$props3.keyRoute,
109106
+ jsonKey = _this$props3.jsonKey,
109107
+ nodeKey = _this$props3.nodeKey,
109108
+ targetJsonSchema = _this$props3.targetJsonSchema;
109159
109109
  // 从jsonData中获取对应的数值
109160
109110
  var curJsonData = getJSONDataByKeyRoute(keyRoute);
109161
109111
  var readOnly = targetJsonSchema.readOnly || false; // 是否只读(默认可编辑)
@@ -109284,12 +109234,8 @@ styles.join("\\n")
109284
109234
  /* harmony default export */ __webpack_exports__['default'] = (0,
109285
109235
  mobx_react__WEBPACK_IMPORTED_MODULE_8__.inject)(function (stores) {
109286
109236
  return {
109287
- pageScreen: stores.JSONSchemaStore.pageScreen,
109288
- getJSONDataByKeyRoute:
109289
- stores.JSONEditorStore.getJSONDataByKeyRoute,
109290
- updateFormValueData: stores.JSONEditorStore.updateFormValueData,
109291
- getInitJsonDataByKeyRoute:
109292
- stores.JSONEditorStore.getInitJsonDataByKeyRoute,
109237
+ schemaStore: stores.JSONSchemaStore,
109238
+ jsonStore: stores.JSONEditorStore,
109293
109239
  };
109294
109240
  })(
109295
109241
  (0, mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer)(
@@ -109606,7 +109552,6 @@ styles.join("\\n")
109606
109552
  newVal,
109607
109553
  ignoreChange,
109608
109554
  ) {
109609
- var _this = this;
109610
109555
  if (keyRoute !== '') {
109611
109556
  // 1. 获取父级key路径和最近的有一个key
109612
109557
  var parentKeyRoute_CurKey = (0,
@@ -109627,14 +109572,7 @@ styles.join("\\n")
109627
109572
  // 当keyRoute为空时直接修改当前schemaData
109628
109573
  this.jsonData = newVal;
109629
109574
  }
109630
- if (
109631
- this.state.rootJSONStore.JSONSchemaStore &&
109632
- this.state.rootJSONStore.JSONSchemaStore.jsonSchema
109633
- ) {
109634
- // 获取当前schema的条件字段
109635
- var curJsonSchema =
109636
- this.state.rootJSONStore.JSONSchemaStore.jsonSchema;
109637
- var conditionProps = curJsonSchema.conditionProps;
109575
+ if (this.state.rootJSONStore.JSONSchemaStore) {
109638
109576
  // 备注:数组类型通过keyRoute获取schema对象会有异常
109639
109577
  var curElemSchema =
109640
109578
  this.state.rootJSONStore.JSONSchemaStore.getSchemaByKeyRoute(
@@ -109643,15 +109581,7 @@ styles.join("\\n")
109643
109581
  if (curElemSchema && curElemSchema.isConditionProp) {
109644
109582
  // 判断条件字段的快捷通道:如果是条件字段则更新LastInitTime
109645
109583
  this.updateLastTime();
109646
- } else if (conditionProps) {
109647
- // 判断当前字段是否为条件字段
109648
- Object.keys(conditionProps).map(function (propKey) {
109649
- var conditionItem = conditionProps[propKey];
109650
- if (conditionItem.keyRoute === keyRoute) {
109651
- // 更新LastInitTime
109652
- _this.updateLastTime();
109653
- }
109654
- });
109584
+ // this.triggerChangeAction(); // 用于主动触发组件更新
109655
109585
  }
109656
109586
  }
109657
109587
  if (!ignoreChange) {
@@ -110702,15 +110632,31 @@ styles.join("\\n")
110702
110632
  },
110703
110633
  /* harmony export */
110704
110634
  });
110635
+ /* harmony import */ var _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_0__ =
110636
+ __webpack_require__(
110637
+ /*! @wibetter/json-utils */ '../json-utils/dist/index.esm.js',
110638
+ );
110639
+ /* harmony import */ var _webCache_js__WEBPACK_IMPORTED_MODULE_1__ =
110640
+ __webpack_require__(/*! ./webCache.js */ './src/utils/webCache.js');
110641
+
110705
110642
  /** js对象数据深拷贝,避免数据联动 */
110706
110643
  function objClone(targetObj) {
110707
- var newObj = JSON.stringify(targetObj);
110708
- return JSON.parse(newObj);
110644
+ // const newObj = JSON.stringify(targetObj);
110645
+ // return JSON.parse(newObj);
110646
+ return (0,
110647
+ _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_0__.objClone)(
110648
+ targetObj,
110649
+ );
110709
110650
  }
110710
110651
 
110711
110652
  /** 对比两个json数据是否相等 */
110712
110653
  function isEqual(targetObj, nextTargetObj) {
110713
- return JSON.stringify(targetObj) === JSON.stringify(nextTargetObj);
110654
+ // return JSON.stringify(targetObj) === JSON.stringify(nextTargetObj);
110655
+ return (0,
110656
+ _wibetter_json_utils__WEBPACK_IMPORTED_MODULE_0__.isEqual)(
110657
+ targetObj,
110658
+ nextTargetObj,
110659
+ );
110714
110660
  }
110715
110661
 
110716
110662
  /** 判断当前属性是否存在
@@ -110844,29 +110790,35 @@ styles.join("\\n")
110844
110790
 
110845
110791
  /**
110846
110792
  * 将数据缓存到sessionStorage中
110847
- * */
110848
- function saveWebCacheData(cacheKey, targetSourceIndex) {
110849
- if (window.sessionStorage) {
110850
- window.sessionStorage.setItem(cacheKey, targetSourceIndex);
110851
- }
110793
+ */
110794
+ function saveWebCacheData(valueKey, value) {
110795
+ (0, _webCache_js__WEBPACK_IMPORTED_MODULE_1__.saveJSONEditorCache)(
110796
+ valueKey,
110797
+ value,
110798
+ 'json-editor-formData',
110799
+ );
110852
110800
  }
110853
110801
 
110854
110802
  /**
110855
110803
  * 从sessionStorage中读取此前缓存的数据
110856
- * */
110857
- function getWebCacheData(cacheKey) {
110858
- if (window.sessionStorage) {
110859
- return window.sessionStorage.getItem(cacheKey);
110860
- }
110804
+ */
110805
+ function getWebCacheData(valueKey) {
110806
+ return (0,
110807
+ _webCache_js__WEBPACK_IMPORTED_MODULE_1__.getJSONEditorCache)(
110808
+ valueKey,
110809
+ 'json-editor-formData',
110810
+ );
110861
110811
  }
110862
110812
 
110863
110813
  /**
110864
110814
  * 从sessionStorage中删除此前缓存的数据
110865
- * */
110866
- function deleteWebCacheData(cacheKey) {
110867
- if (window.sessionStorage) {
110868
- return window.sessionStorage.removeItem(cacheKey);
110869
- }
110815
+ */
110816
+ function deleteWebCacheData(valueKey) {
110817
+ (0,
110818
+ _webCache_js__WEBPACK_IMPORTED_MODULE_1__.deleteJSONEditorCache)(
110819
+ valueKey,
110820
+ 'json-editor-formData',
110821
+ );
110870
110822
  }
110871
110823
 
110872
110824
  /***/
@@ -111053,6 +111005,95 @@ styles.join("\\n")
111053
111005
  /***/
111054
111006
  },
111055
111007
 
111008
+ /***/ './src/utils/webCache.js':
111009
+ /*!*******************************!*\
111010
+ !*** ./src/utils/webCache.js ***!
111011
+ \*******************************/
111012
+ /***/ function (
111013
+ __unused_webpack_module,
111014
+ __webpack_exports__,
111015
+ __webpack_require__,
111016
+ ) {
111017
+ 'use strict';
111018
+ __webpack_require__.r(__webpack_exports__);
111019
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
111020
+ /* harmony export */ deleteJSONEditorCache: function () {
111021
+ return /* binding */ deleteJSONEditorCache;
111022
+ },
111023
+ /* harmony export */ getJSONEditorCache: function () {
111024
+ return /* binding */ getJSONEditorCache;
111025
+ },
111026
+ /* harmony export */ saveJSONEditorCache: function () {
111027
+ return /* binding */ saveJSONEditorCache;
111028
+ },
111029
+ /* harmony export */
111030
+ });
111031
+ /**
111032
+ * 将数据缓存到sessionStorage中
111033
+ * */
111034
+ function saveJSONEditorCache(key, value, cacheMark) {
111035
+ if (cacheMark === void 0) {
111036
+ cacheMark = 'json-editor-cache';
111037
+ }
111038
+ if (window.sessionStorage) {
111039
+ var cacheData = {};
111040
+ var cacheDataStr = window.sessionStorage.getItem(cacheMark);
111041
+ if (cacheDataStr) {
111042
+ cacheData = JSON.parse(cacheDataStr);
111043
+ }
111044
+ if (key) {
111045
+ cacheData[key] = value;
111046
+ }
111047
+ window.sessionStorage.setItem(
111048
+ cacheMark,
111049
+ JSON.stringify(cacheData),
111050
+ );
111051
+ }
111052
+ }
111053
+
111054
+ /**
111055
+ * 从sessionStorage中读取此前缓存的数据
111056
+ * */
111057
+ function getJSONEditorCache(valueKey, cacheMark) {
111058
+ if (cacheMark === void 0) {
111059
+ cacheMark = 'json-editor-cache';
111060
+ }
111061
+ var curKeyValue;
111062
+ if (window.sessionStorage) {
111063
+ var cacheData = {};
111064
+ var cacheDataStr = window.sessionStorage.getItem(cacheMark);
111065
+ if (cacheDataStr) {
111066
+ cacheData = JSON.parse(cacheDataStr);
111067
+ }
111068
+ if (valueKey) {
111069
+ curKeyValue = cacheData[valueKey];
111070
+ }
111071
+ }
111072
+ return curKeyValue;
111073
+ }
111074
+
111075
+ /**
111076
+ * 从sessionStorage中删除此前缓存的数据
111077
+ * */
111078
+ function deleteJSONEditorCache(valueKey, cacheMark) {
111079
+ if (cacheMark === void 0) {
111080
+ cacheMark = 'json-editor-cache';
111081
+ }
111082
+ if (window.sessionStorage) {
111083
+ var cacheData = {};
111084
+ var cacheDataStr = window.sessionStorage.getItem(cacheMark);
111085
+ if (cacheDataStr) {
111086
+ cacheData = JSON.parse(cacheDataStr);
111087
+ }
111088
+ if (valueKey) {
111089
+ cacheData[valueKey] = undefined;
111090
+ }
111091
+ }
111092
+ }
111093
+
111094
+ /***/
111095
+ },
111096
+
111056
111097
  /***/ '../../node_modules/braft-convert/dist/configs.js':
111057
111098
  /*!********************************************************!*\
111058
111099
  !*** ../../node_modules/braft-convert/dist/configs.js ***!
@@ -363794,6 +363835,9 @@ type StyleObjectPart = {
363794
363835
  /* harmony export */ dynamicDataAnalyzer: function () {
363795
363836
  return /* binding */ dynamicDataAnalyzer;
363796
363837
  },
363838
+ /* harmony export */ expressionOn: function () {
363839
+ return /* binding */ expressionOn;
363840
+ },
363797
363841
  /* harmony export */ getCurPosition: function () {
363798
363842
  return /* binding */ getCurPosition;
363799
363843
  },
@@ -363920,6 +363964,9 @@ type StyleObjectPart = {
363920
363964
  /* harmony export */ registerExpectType: function () {
363921
363965
  return /* binding */ registerExpectType;
363922
363966
  },
363967
+ /* harmony export */ schema2conditionValue: function () {
363968
+ return /* binding */ schema2conditionValue;
363969
+ },
363923
363970
  /* harmony export */ schema2json: function () {
363924
363971
  return /* binding */ schema2json;
363925
363972
  },
@@ -363984,6 +364031,17 @@ type StyleObjectPart = {
363984
364031
  );
363985
364032
  }
363986
364033
 
364034
+ /**
364035
+ * 支持属性表达式
364036
+ */
364037
+ function expressionOn(expressionStr, data) {
364038
+ var expressionFunc = new Function(
364039
+ 'data',
364040
+ 'with(data) { return (' + expressionStr + ');}',
364041
+ );
364042
+ return expressionFunc(data);
364043
+ }
364044
+
363987
364045
  /**
363988
364046
  * getJSONDataByKeyRoute: 根据key值路径获取对应的json数据
363989
364047
  * 【方法参数说明】
@@ -364585,7 +364643,7 @@ type StyleObjectPart = {
364585
364643
  * readOnly:字段项可设置是否可编辑
364586
364644
  * */
364587
364645
  var initInputImageData = {
364588
- title: '图片',
364646
+ title: '图片地址',
364589
364647
  type: 'input-image',
364590
364648
  description: '',
364591
364649
  // 字段项的说明和描述
@@ -364607,7 +364665,7 @@ type StyleObjectPart = {
364607
364665
  title: '数组Array',
364608
364666
  description: '',
364609
364667
  // 字段项的说明和描述
364610
- default: [],
364668
+ // default: [],
364611
364669
  items: {
364612
364670
  type: 'object',
364613
364671
  title: '数组项',
@@ -365173,6 +365231,8 @@ type StyleObjectPart = {
365173
365231
  default: '',
365174
365232
  description: '',
365175
365233
  placeholder: '',
365234
+ onShow:
365235
+ 'type === "DevDefaults" || type === "Content" || type === "RuntimeConst"',
365176
365236
  },
365177
365237
  description: {
365178
365238
  title: '属性名称',
@@ -365180,6 +365240,8 @@ type StyleObjectPart = {
365180
365240
  default: '',
365181
365241
  description: '',
365182
365242
  placeholder: '',
365243
+ onShow:
365244
+ 'type === "ContentStaticConfig" || type === "ResourceCenter"',
365183
365245
  },
365184
365246
  valueType: {
365185
365247
  type: 'radio',
@@ -365197,12 +365259,16 @@ type StyleObjectPart = {
365197
365259
  default: 'string',
365198
365260
  isConditionProp: true,
365199
365261
  description: '',
365262
+ onShow:
365263
+ 'type === "ContentStaticConfig" || type === "ResourceCenter"',
365200
365264
  },
365201
365265
  range: {
365202
365266
  type: 'select',
365203
365267
  title: '可选项',
365204
365268
  multiple: true,
365205
365269
  options: [],
365270
+ onShow:
365271
+ '(type === "ContentStaticConfig" || type === "ResourceCenter") && valueType === "select"',
365206
365272
  description: '这里会使用value中的配置选项作为options',
365207
365273
  },
365208
365274
  },
@@ -365260,6 +365326,7 @@ type StyleObjectPart = {
365260
365326
  default: '',
365261
365327
  description: '',
365262
365328
  placeholder: '',
365329
+ onShow: 'type === "ContentStaticConfig"',
365263
365330
  },
365264
365331
  dataType: {
365265
365332
  type: 'radio',
@@ -365286,6 +365353,7 @@ type StyleObjectPart = {
365286
365353
  default: '',
365287
365354
  description: '',
365288
365355
  placeholder: '',
365356
+ onShow: 'type === "RuntimeDataSelfDefine"',
365289
365357
  },
365290
365358
  CONTENTTYPE: {
365291
365359
  type: 'select',
@@ -365305,6 +365373,7 @@ type StyleObjectPart = {
365305
365373
  },
365306
365374
  ],
365307
365375
  description: '',
365376
+ onShow: 'type === "RuntimeDataSelfDefine"',
365308
365377
  },
365309
365378
  },
365310
365379
  propertyOrder: [
@@ -365518,6 +365587,619 @@ type StyleObjectPart = {
365518
365587
  propertyOrder: ['mainConfig', 'otherConfig', 'outConfig'],
365519
365588
  showCodeViewBtn: false,
365520
365589
  };
365590
+ var initAdConfigSchema = {
365591
+ type: 'object',
365592
+ title: '广告配置',
365593
+ description: '',
365594
+ properties: {
365595
+ type: {
365596
+ type: 'select',
365597
+ title: '数据源类型',
365598
+ isConditionProp: true,
365599
+ options: [
365600
+ {
365601
+ label: '模板直接设置',
365602
+ value: 'DevDefaults',
365603
+ },
365604
+ {
365605
+ label: '资源中心配置',
365606
+ value: 'ResourceCenter',
365607
+ },
365608
+ ],
365609
+ description: '',
365610
+ },
365611
+ value: {
365612
+ type: 'object',
365613
+ title: '广告规则',
365614
+ description: '',
365615
+ onShow: 'type === "DevDefaults"',
365616
+ properties: {
365617
+ id: {
365618
+ title: '广告ID',
365619
+ type: 'input',
365620
+ default: '',
365621
+ description: '',
365622
+ placeholder: '',
365623
+ },
365624
+ rule: {
365625
+ type: 'radio',
365626
+ title: '规则类型',
365627
+ options: [
365628
+ {
365629
+ label: '固定位置',
365630
+ value: 1,
365631
+ },
365632
+ {
365633
+ label: '隔几出几',
365634
+ value: 2,
365635
+ },
365636
+ {
365637
+ label: '固定位置隔几出几',
365638
+ value: 3,
365639
+ },
365640
+ ],
365641
+ default: 1,
365642
+ description: '',
365643
+ },
365644
+ fixArray: {
365645
+ type: 'select',
365646
+ title: '固定位置',
365647
+ default: 1,
365648
+ description: '',
365649
+ options: [
365650
+ {
365651
+ label: '1',
365652
+ value: 1,
365653
+ },
365654
+ {
365655
+ label: '2',
365656
+ value: 2,
365657
+ },
365658
+ {
365659
+ label: '3',
365660
+ value: 3,
365661
+ },
365662
+ {
365663
+ label: '4',
365664
+ value: 4,
365665
+ },
365666
+ {
365667
+ label: '5',
365668
+ value: 5,
365669
+ },
365670
+ {
365671
+ label: '6',
365672
+ value: 6,
365673
+ },
365674
+ {
365675
+ label: '7',
365676
+ value: 7,
365677
+ },
365678
+ {
365679
+ label: '8',
365680
+ value: 8,
365681
+ },
365682
+ {
365683
+ label: '9',
365684
+ value: 9,
365685
+ },
365686
+ {
365687
+ label: '10',
365688
+ value: 10,
365689
+ },
365690
+ {
365691
+ label: '11',
365692
+ value: 11,
365693
+ },
365694
+ {
365695
+ label: '12',
365696
+ value: 12,
365697
+ },
365698
+ {
365699
+ label: '13',
365700
+ value: 13,
365701
+ },
365702
+ {
365703
+ label: '14',
365704
+ value: 14,
365705
+ },
365706
+ {
365707
+ label: '15',
365708
+ value: 15,
365709
+ },
365710
+ {
365711
+ label: '16',
365712
+ value: 16,
365713
+ },
365714
+ {
365715
+ label: '17',
365716
+ value: 17,
365717
+ },
365718
+ {
365719
+ label: '18',
365720
+ value: 18,
365721
+ },
365722
+ {
365723
+ label: '19',
365724
+ value: 19,
365725
+ },
365726
+ {
365727
+ label: '20',
365728
+ value: 20,
365729
+ },
365730
+ {
365731
+ label: '21',
365732
+ value: 21,
365733
+ },
365734
+ {
365735
+ label: '22',
365736
+ value: 22,
365737
+ },
365738
+ {
365739
+ label: '23',
365740
+ value: 23,
365741
+ },
365742
+ {
365743
+ label: '24',
365744
+ value: 24,
365745
+ },
365746
+ {
365747
+ label: '25',
365748
+ value: 25,
365749
+ },
365750
+ {
365751
+ label: '26',
365752
+ value: 26,
365753
+ },
365754
+ {
365755
+ label: '27',
365756
+ value: 27,
365757
+ },
365758
+ {
365759
+ label: '28',
365760
+ value: 28,
365761
+ },
365762
+ {
365763
+ label: '29',
365764
+ value: 29,
365765
+ },
365766
+ {
365767
+ label: '30',
365768
+ value: 30,
365769
+ },
365770
+ {
365771
+ label: '31',
365772
+ value: 31,
365773
+ },
365774
+ {
365775
+ label: '32',
365776
+ value: 32,
365777
+ },
365778
+ {
365779
+ label: '33',
365780
+ value: 33,
365781
+ },
365782
+ {
365783
+ label: '34',
365784
+ value: 34,
365785
+ },
365786
+ {
365787
+ label: '35',
365788
+ value: 35,
365789
+ },
365790
+ {
365791
+ label: '36',
365792
+ value: 36,
365793
+ },
365794
+ {
365795
+ label: '37',
365796
+ value: 37,
365797
+ },
365798
+ {
365799
+ label: '38',
365800
+ value: 38,
365801
+ },
365802
+ {
365803
+ label: '39',
365804
+ value: 39,
365805
+ },
365806
+ {
365807
+ label: '40',
365808
+ value: 40,
365809
+ },
365810
+ {
365811
+ label: '41',
365812
+ value: 41,
365813
+ },
365814
+ {
365815
+ label: '42',
365816
+ value: 42,
365817
+ },
365818
+ {
365819
+ label: '43',
365820
+ value: 43,
365821
+ },
365822
+ {
365823
+ label: '44',
365824
+ value: 44,
365825
+ },
365826
+ {
365827
+ label: '45',
365828
+ value: 45,
365829
+ },
365830
+ {
365831
+ label: '46',
365832
+ value: 46,
365833
+ },
365834
+ {
365835
+ label: '47',
365836
+ value: 47,
365837
+ },
365838
+ {
365839
+ label: '48',
365840
+ value: 48,
365841
+ },
365842
+ {
365843
+ label: '49',
365844
+ value: 49,
365845
+ },
365846
+ {
365847
+ label: '50',
365848
+ value: 50,
365849
+ },
365850
+ ],
365851
+ },
365852
+ begin: {
365853
+ type: 'number',
365854
+ title: '开始位置',
365855
+ default: 1,
365856
+ minimum: '1',
365857
+ maximum: '50',
365858
+ description: '',
365859
+ },
365860
+ turn: {
365861
+ type: 'number',
365862
+ title: '间隔/隔',
365863
+ default: 1,
365864
+ minimum: '1',
365865
+ maximum: '50',
365866
+ description: '',
365867
+ },
365868
+ number: {
365869
+ type: 'number',
365870
+ title: '间隔/出',
365871
+ default: 1,
365872
+ minimum: '1',
365873
+ maximum: '50',
365874
+ description: '',
365875
+ },
365876
+ mergeType: {
365877
+ type: 'radio',
365878
+ title: '插入规则',
365879
+ options: [
365880
+ {
365881
+ label: '覆盖',
365882
+ value: 0,
365883
+ },
365884
+ {
365885
+ label: '插入',
365886
+ value: 1,
365887
+ },
365888
+ ],
365889
+ default: 0,
365890
+ description: '',
365891
+ },
365892
+ },
365893
+ propertyOrder: [
365894
+ 'id',
365895
+ 'rule',
365896
+ 'fixArray',
365897
+ 'begin',
365898
+ 'turn',
365899
+ 'number',
365900
+ 'mergeType',
365901
+ ],
365902
+ },
365903
+ range: {
365904
+ type: 'array',
365905
+ title: '广告规则列表',
365906
+ description: '',
365907
+ onShow: 'type === "ResourceCenter"',
365908
+ items: {
365909
+ type: 'object',
365910
+ title: '数组项',
365911
+ description: '',
365912
+ properties: {
365913
+ id: {
365914
+ title: '广告ID',
365915
+ type: 'input',
365916
+ default: '',
365917
+ description: '',
365918
+ placeholder: '',
365919
+ },
365920
+ rule: {
365921
+ type: 'radio',
365922
+ title: '规则类型',
365923
+ options: [
365924
+ {
365925
+ label: '固定位置',
365926
+ value: 1,
365927
+ },
365928
+ {
365929
+ label: '隔几出几',
365930
+ value: 2,
365931
+ },
365932
+ {
365933
+ label: '固定位置隔几出几',
365934
+ value: 3,
365935
+ },
365936
+ ],
365937
+ default: 1,
365938
+ description: '',
365939
+ },
365940
+ fixArray: {
365941
+ type: 'select',
365942
+ title: '固定位置',
365943
+ default: 1,
365944
+ description: '',
365945
+ options: [
365946
+ {
365947
+ label: '1',
365948
+ value: 1,
365949
+ },
365950
+ {
365951
+ label: '2',
365952
+ value: 2,
365953
+ },
365954
+ {
365955
+ label: '3',
365956
+ value: 3,
365957
+ },
365958
+ {
365959
+ label: '4',
365960
+ value: 4,
365961
+ },
365962
+ {
365963
+ label: '5',
365964
+ value: 5,
365965
+ },
365966
+ {
365967
+ label: '6',
365968
+ value: 6,
365969
+ },
365970
+ {
365971
+ label: '7',
365972
+ value: 7,
365973
+ },
365974
+ {
365975
+ label: '8',
365976
+ value: 8,
365977
+ },
365978
+ {
365979
+ label: '9',
365980
+ value: 9,
365981
+ },
365982
+ {
365983
+ label: '10',
365984
+ value: 10,
365985
+ },
365986
+ {
365987
+ label: '11',
365988
+ value: 11,
365989
+ },
365990
+ {
365991
+ label: '12',
365992
+ value: 12,
365993
+ },
365994
+ {
365995
+ label: '13',
365996
+ value: 13,
365997
+ },
365998
+ {
365999
+ label: '14',
366000
+ value: 14,
366001
+ },
366002
+ {
366003
+ label: '15',
366004
+ value: 15,
366005
+ },
366006
+ {
366007
+ label: '16',
366008
+ value: 16,
366009
+ },
366010
+ {
366011
+ label: '17',
366012
+ value: 17,
366013
+ },
366014
+ {
366015
+ label: '18',
366016
+ value: 18,
366017
+ },
366018
+ {
366019
+ label: '19',
366020
+ value: 19,
366021
+ },
366022
+ {
366023
+ label: '20',
366024
+ value: 20,
366025
+ },
366026
+ {
366027
+ label: '21',
366028
+ value: 21,
366029
+ },
366030
+ {
366031
+ label: '22',
366032
+ value: 22,
366033
+ },
366034
+ {
366035
+ label: '23',
366036
+ value: 23,
366037
+ },
366038
+ {
366039
+ label: '24',
366040
+ value: 24,
366041
+ },
366042
+ {
366043
+ label: '25',
366044
+ value: 25,
366045
+ },
366046
+ {
366047
+ label: '26',
366048
+ value: 26,
366049
+ },
366050
+ {
366051
+ label: '27',
366052
+ value: 27,
366053
+ },
366054
+ {
366055
+ label: '28',
366056
+ value: 28,
366057
+ },
366058
+ {
366059
+ label: '29',
366060
+ value: 29,
366061
+ },
366062
+ {
366063
+ label: '30',
366064
+ value: 30,
366065
+ },
366066
+ {
366067
+ label: '31',
366068
+ value: 31,
366069
+ },
366070
+ {
366071
+ label: '32',
366072
+ value: 32,
366073
+ },
366074
+ {
366075
+ label: '33',
366076
+ value: 33,
366077
+ },
366078
+ {
366079
+ label: '34',
366080
+ value: 34,
366081
+ },
366082
+ {
366083
+ label: '35',
366084
+ value: 35,
366085
+ },
366086
+ {
366087
+ label: '36',
366088
+ value: 36,
366089
+ },
366090
+ {
366091
+ label: '37',
366092
+ value: 37,
366093
+ },
366094
+ {
366095
+ label: '38',
366096
+ value: 38,
366097
+ },
366098
+ {
366099
+ label: '39',
366100
+ value: 39,
366101
+ },
366102
+ {
366103
+ label: '40',
366104
+ value: 40,
366105
+ },
366106
+ {
366107
+ label: '41',
366108
+ value: 41,
366109
+ },
366110
+ {
366111
+ label: '42',
366112
+ value: 42,
366113
+ },
366114
+ {
366115
+ label: '43',
366116
+ value: 43,
366117
+ },
366118
+ {
366119
+ label: '44',
366120
+ value: 44,
366121
+ },
366122
+ {
366123
+ label: '45',
366124
+ value: 45,
366125
+ },
366126
+ {
366127
+ label: '46',
366128
+ value: 46,
366129
+ },
366130
+ {
366131
+ label: '47',
366132
+ value: 47,
366133
+ },
366134
+ {
366135
+ label: '48',
366136
+ value: 48,
366137
+ },
366138
+ {
366139
+ label: '49',
366140
+ value: 49,
366141
+ },
366142
+ {
366143
+ label: '50',
366144
+ value: 50,
366145
+ },
366146
+ ],
366147
+ },
366148
+ begin: {
366149
+ type: 'number',
366150
+ title: '开始位置',
366151
+ default: 1,
366152
+ minimum: '1',
366153
+ maximum: '50',
366154
+ description: '',
366155
+ },
366156
+ turn: {
366157
+ type: 'number',
366158
+ title: '间隔/隔',
366159
+ default: 1,
366160
+ minimum: '1',
366161
+ maximum: '50',
366162
+ description: '',
366163
+ },
366164
+ number: {
366165
+ type: 'number',
366166
+ title: '间隔/出',
366167
+ default: 1,
366168
+ minimum: '1',
366169
+ maximum: '50',
366170
+ description: '',
366171
+ },
366172
+ mergeType: {
366173
+ type: 'radio',
366174
+ title: '插入规则',
366175
+ options: [
366176
+ {
366177
+ label: '覆盖',
366178
+ value: 0,
366179
+ },
366180
+ {
366181
+ label: '插入',
366182
+ value: 1,
366183
+ },
366184
+ ],
366185
+ default: 0,
366186
+ description: '',
366187
+ },
366188
+ },
366189
+ propertyOrder: [
366190
+ 'id',
366191
+ 'rule',
366192
+ 'fixArray',
366193
+ 'begin',
366194
+ 'turn',
366195
+ 'number',
366196
+ 'mergeType',
366197
+ ],
366198
+ },
366199
+ },
366200
+ },
366201
+ propertyOrder: ['type', 'value', 'range'],
366202
+ };
365521
366203
 
365522
366204
  /** dynamicConfig: 动态配置
365523
366205
  * 【字段属性说明】
@@ -365630,6 +366312,7 @@ type StyleObjectPart = {
365630
366312
  'dynamic-config': initDynamicConfig,
365631
366313
  'sohu-source': initSohuSourceData,
365632
366314
  'sohu-event': initSohuEventConfig,
366315
+ 'sohu-ad': initAdConfigSchema,
365633
366316
  };
365634
366317
 
365635
366318
  // 事件类型数据
@@ -371235,8 +371918,9 @@ and limitations under the License.
371235
371918
  var oldValue = jsonData;
371236
371919
  if (
371237
371920
  hasProperties(oldValue) &&
371238
- hasProperties(jsonItem.default) &&
371239
- typeof oldValue !== typeof jsonItem.default
371921
+ ((hasProperties(jsonItem.default) &&
371922
+ typeof oldValue !== typeof jsonSchema.default) ||
371923
+ !isObject$1(oldValue))
371240
371924
  ) {
371241
371925
  // 表示当前数据类型发生变化,则丢弃旧版数据
371242
371926
  oldValue = undefined;
@@ -371406,8 +372090,9 @@ and limitations under the License.
371406
372090
  var oldValue = jsonData;
371407
372091
  if (
371408
372092
  hasProperties(oldValue) &&
371409
- hasProperties(jsonSchema.default) &&
371410
- typeof oldValue !== typeof jsonSchema.default
372093
+ ((hasProperties(jsonSchema.default) &&
372094
+ typeof oldValue !== typeof jsonSchema.default) ||
372095
+ !isArray(oldValue))
371411
372096
  ) {
371412
372097
  // 表示当前数据类型发生变化,则丢弃旧版数据
371413
372098
  oldValue = undefined;
@@ -371684,6 +372369,42 @@ and limitations under the License.
371684
372369
  return treeData;
371685
372370
  }
371686
372371
 
372372
+ /**
372373
+ * 收集当前schema中的所有条件子字段,根据其数值拼接成对应的 conditionValue
372374
+ */
372375
+ function schema2conditionValue(jsonSchema, jsonData) {
372376
+ var conditionValue = '';
372377
+ if (
372378
+ getExpectType$1(jsonSchema.type) === 'object' &&
372379
+ jsonSchema.properties
372380
+ ) {
372381
+ var curPropertyOrder = [];
372382
+ if (jsonSchema.propertyOrder) {
372383
+ curPropertyOrder = jsonSchema.propertyOrder;
372384
+ } else {
372385
+ curPropertyOrder = Object.keys(jsonSchema.properties);
372386
+ }
372387
+ curPropertyOrder.map(function (jsonKey) {
372388
+ var curJsonItem = jsonSchema.properties[jsonKey];
372389
+ var curConditionValue = jsonData[jsonKey];
372390
+ if (
372391
+ getExpectType$1(curJsonItem.type) !== 'array' ||
372392
+ getExpectType$1(curJsonItem.type) !== 'object'
372393
+ ) {
372394
+ if (curConditionValue && curJsonItem.isConditionProp) {
372395
+ // 仅记录条件字段数值
372396
+ if (conditionValue.indexOf('-') > 0) {
372397
+ conditionValue += '-' + curConditionValue;
372398
+ } else {
372399
+ conditionValue = curConditionValue;
372400
+ }
372401
+ }
372402
+ }
372403
+ });
372404
+ }
372405
+ return conditionValue;
372406
+ }
372407
+
371687
372408
  /**
371688
372409
  * 获取父元素的key路径值
371689
372410
  */