@wibetter/json-editor 5.0.23 → 5.0.26

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/lib/index.css CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.0.23
2
+ * @wibetter/json-editor v5.0.26
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Thu Jan 02 2025 10:20:42 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 02 2025 17:13:11 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  /*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
package/lib/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.0.23
2
+ * @wibetter/json-editor v5.0.26
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Thu Jan 02 2025 10:20:42 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 02 2025 17:13:11 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -476,7 +476,7 @@ var MappingRender = function MappingRender(props) {
476
476
  var parentKeyRoute = (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.getParentKeyRoute)(keyRoute);
477
477
  var parentData = parentKeyRoute ? getJSONDataByKeyRoute(parentKeyRoute) || {} : {}; // 获取当前父级数据域
478
478
  var curData = Object.assign({}, JSONEditorObj, parentData);
479
- if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isBoolean)(targetJsonSchema.onShow) && !targetJsonSchema.onShow || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isString)(targetJsonSchema.onShow) && !(0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.onShow, curData)) {
479
+ if (targetJsonSchema.onShow !== undefined && targetJsonSchema.onShow !== null && targetJsonSchema.onShow !== '' && ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isBoolean)(targetJsonSchema.onShow) && !targetJsonSchema.onShow || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isString)(targetJsonSchema.onShow) && !(0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.onShow, curData))) {
480
480
  return;
481
481
  }
482
482
  var curType = targetJsonSchema.typeOn ? (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.typeOn, curData) : targetJsonSchema.type;
@@ -5642,10 +5642,19 @@ var SohuEventSchema = /*#__PURE__*/function (_React$PureComponent) {
5642
5642
  _options = _ref.options;
5643
5643
  var newTitle = inputEvent.target.value;
5644
5644
  var curJsonData = getJSONDataByKeyRoute(keyRoute) || {};
5645
+ var eventData = Object.assign([], (0,mobx__WEBPACK_IMPORTED_MODULE_3__.toJS)(curJsonData.event));
5645
5646
  var globalEventMap = Object.assign({}, (0,mobx__WEBPACK_IMPORTED_MODULE_3__.toJS)(curJsonData.globalEventMap));
5646
- var curKeyRout = keyRoute + "-globalEventMap";
5647
5647
  globalEventMap[eventCode] = newTitle;
5648
- updateFormValueData(curKeyRout, globalEventMap);
5648
+ eventData.forEach(function (event) {
5649
+ if (event.code === eventCode && event.desc !== undefined) {
5650
+ event.desc = newTitle;
5651
+ }
5652
+ });
5653
+ // const curKeyRout = `${keyRoute}-globalEventMap`;
5654
+ updateFormValueData(keyRoute, {
5655
+ event: eventData,
5656
+ globalEventMap: globalEventMap
5657
+ });
5649
5658
  };
5650
5659
  _this.handleSelectEventChange = function (eventName, newEventCode) {
5651
5660
  var _this$props2 = _this.props,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wibetter/json-editor",
3
- "version": "5.0.23",
3
+ "version": "5.0.26",
4
4
  "description": "JSON数据可视化/JSONEditor, 可视化界面编辑json数据",
5
5
  "keywords": [
6
6
  "json",
package/sdk/index.css CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.0.23
2
+ * @wibetter/json-editor v5.0.26
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Thu Jan 02 2025 10:20:53 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 02 2025 17:13:23 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  /*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
package/sdk/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.0.23
2
+ * @wibetter/json-editor v5.0.26
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Thu Jan 02 2025 10:20:53 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 02 2025 17:13:23 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -66926,7 +66926,7 @@ var MappingRender = function MappingRender(props) {
66926
66926
  var parentKeyRoute = (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.getParentKeyRoute)(keyRoute);
66927
66927
  var parentData = parentKeyRoute ? getJSONDataByKeyRoute(parentKeyRoute) || {} : {}; // 获取当前父级数据域
66928
66928
  var curData = Object.assign({}, JSONEditorObj, parentData);
66929
- if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isBoolean)(targetJsonSchema.onShow) && !targetJsonSchema.onShow || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isString)(targetJsonSchema.onShow) && !(0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.onShow, curData)) {
66929
+ if (targetJsonSchema.onShow !== undefined && targetJsonSchema.onShow !== null && targetJsonSchema.onShow !== '' && ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isBoolean)(targetJsonSchema.onShow) && !targetJsonSchema.onShow || (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.isString)(targetJsonSchema.onShow) && !(0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.onShow, curData))) {
66930
66930
  return;
66931
66931
  }
66932
66932
  var curType = targetJsonSchema.typeOn ? (0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_2__.evalExpression)(targetJsonSchema.typeOn, curData) : targetJsonSchema.type;
@@ -71986,10 +71986,19 @@ var SohuEventSchema = /*#__PURE__*/function (_React$PureComponent) {
71986
71986
  _options = _ref.options;
71987
71987
  var newTitle = inputEvent.target.value;
71988
71988
  var curJsonData = getJSONDataByKeyRoute(keyRoute) || {};
71989
+ var eventData = Object.assign([], (0,mobx__WEBPACK_IMPORTED_MODULE_2__.toJS)(curJsonData.event));
71989
71990
  var globalEventMap = Object.assign({}, (0,mobx__WEBPACK_IMPORTED_MODULE_2__.toJS)(curJsonData.globalEventMap));
71990
- var curKeyRout = keyRoute + "-globalEventMap";
71991
71991
  globalEventMap[eventCode] = newTitle;
71992
- updateFormValueData(curKeyRout, globalEventMap);
71992
+ eventData.forEach(function (event) {
71993
+ if (event.code === eventCode && event.desc !== undefined) {
71994
+ event.desc = newTitle;
71995
+ }
71996
+ });
71997
+ // const curKeyRout = `${keyRoute}-globalEventMap`;
71998
+ updateFormValueData(keyRoute, {
71999
+ event: eventData,
72000
+ globalEventMap: globalEventMap
72001
+ });
71993
72002
  };
71994
72003
  _this.handleSelectEventChange = function (eventName, newEventCode) {
71995
72004
  var _this$props2 = _this.props,