@wibetter/json-editor 5.0.21 → 5.0.25

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.21
2
+ * @wibetter/json-editor v5.0.25
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Dec 31 2024 17:31:43 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 02 2025 15:12:02 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.21
2
+ * @wibetter/json-editor v5.0.25
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Dec 31 2024 17:31:43 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 02 2025 15:12:02 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -10707,15 +10707,29 @@
10707
10707
  _options = _ref.options;
10708
10708
  var newTitle = inputEvent.target.value;
10709
10709
  var curJsonData = getJSONDataByKeyRoute(keyRoute) || {};
10710
+ var eventData = Object.assign(
10711
+ [],
10712
+ (0, mobx__WEBPACK_IMPORTED_MODULE_3__.toJS)(
10713
+ curJsonData.event,
10714
+ ),
10715
+ );
10710
10716
  var globalEventMap = Object.assign(
10711
10717
  {},
10712
10718
  (0, mobx__WEBPACK_IMPORTED_MODULE_3__.toJS)(
10713
10719
  curJsonData.globalEventMap,
10714
10720
  ),
10715
10721
  );
10716
- var curKeyRout = keyRoute + '-globalEventMap';
10717
10722
  globalEventMap[eventCode] = newTitle;
10718
- updateFormValueData(curKeyRout, globalEventMap);
10723
+ eventData.forEach(function (event) {
10724
+ if (event.code === eventCode && event.desc !== undefined) {
10725
+ event.desc = newTitle;
10726
+ }
10727
+ });
10728
+ // const curKeyRout = `${keyRoute}-globalEventMap`;
10729
+ updateFormValueData(keyRoute, {
10730
+ event: eventData,
10731
+ globalEventMap: globalEventMap,
10732
+ });
10719
10733
  };
10720
10734
  _this.handleSelectEventChange = function (
10721
10735
  eventName,
@@ -13685,8 +13699,9 @@
13685
13699
  );
13686
13700
  this.jsonSchema = newJSONSchema;
13687
13701
  }
13688
- var curJsonData =
13689
- this.state.rootJSONStore.JSONEditorStore.jsonData;
13702
+ var JSONEditorStore =
13703
+ this.state.rootJSONStore.JSONEditorStore;
13704
+ var curJsonData = JSONEditorStore.jsonData;
13690
13705
  var newJsonData = {};
13691
13706
  /** 根据jsonSchema生成对应的最新jsonData */
13692
13707
  if (this.jsonSchema.reset) {
@@ -13714,7 +13729,7 @@
13714
13729
  /** jsonSchema变动的时候触发一次jsonDataChange
13715
13730
  * jsonSchema变动意味着jsonData也需要进行对应的结构更新
13716
13731
  * */
13717
- this.state.rootJSONStore.JSONEditorStore.jsonDataChange();
13732
+ // this.state.rootJSONStore.JSONEditorStore.jsonDataChange();
13718
13733
  }
13719
13734
  };
13720
13735
  /** 根据索引路径获取对应的key值路径 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wibetter/json-editor",
3
- "version": "5.0.21",
3
+ "version": "5.0.25",
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.21
2
+ * @wibetter/json-editor v5.0.25
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Dec 31 2024 17:32:00 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 02 2025 15:12:17 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.21
2
+ * @wibetter/json-editor v5.0.25
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Dec 31 2024 17:32:00 GMT+0800 (中国标准时间)
5
+ * build time: Thu Jan 02 2025 15:12:17 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -110038,15 +110038,29 @@ styles.join("\\n")
110038
110038
  _options = _ref.options;
110039
110039
  var newTitle = inputEvent.target.value;
110040
110040
  var curJsonData = getJSONDataByKeyRoute(keyRoute) || {};
110041
+ var eventData = Object.assign(
110042
+ [],
110043
+ (0, mobx__WEBPACK_IMPORTED_MODULE_2__.toJS)(
110044
+ curJsonData.event,
110045
+ ),
110046
+ );
110041
110047
  var globalEventMap = Object.assign(
110042
110048
  {},
110043
110049
  (0, mobx__WEBPACK_IMPORTED_MODULE_2__.toJS)(
110044
110050
  curJsonData.globalEventMap,
110045
110051
  ),
110046
110052
  );
110047
- var curKeyRout = keyRoute + '-globalEventMap';
110048
110053
  globalEventMap[eventCode] = newTitle;
110049
- updateFormValueData(curKeyRout, globalEventMap);
110054
+ eventData.forEach(function (event) {
110055
+ if (event.code === eventCode && event.desc !== undefined) {
110056
+ event.desc = newTitle;
110057
+ }
110058
+ });
110059
+ // const curKeyRout = `${keyRoute}-globalEventMap`;
110060
+ updateFormValueData(keyRoute, {
110061
+ event: eventData,
110062
+ globalEventMap: globalEventMap,
110063
+ });
110050
110064
  };
110051
110065
  _this.handleSelectEventChange = function (
110052
110066
  eventName,
@@ -112977,8 +112991,9 @@ styles.join("\\n")
112977
112991
  );
112978
112992
  this.jsonSchema = newJSONSchema;
112979
112993
  }
112980
- var curJsonData =
112981
- this.state.rootJSONStore.JSONEditorStore.jsonData;
112994
+ var JSONEditorStore =
112995
+ this.state.rootJSONStore.JSONEditorStore;
112996
+ var curJsonData = JSONEditorStore.jsonData;
112982
112997
  var newJsonData = {};
112983
112998
  /** 根据jsonSchema生成对应的最新jsonData */
112984
112999
  if (this.jsonSchema.reset) {
@@ -113006,7 +113021,7 @@ styles.join("\\n")
113006
113021
  /** jsonSchema变动的时候触发一次jsonDataChange
113007
113022
  * jsonSchema变动意味着jsonData也需要进行对应的结构更新
113008
113023
  * */
113009
- this.state.rootJSONStore.JSONEditorStore.jsonDataChange();
113024
+ // this.state.rootJSONStore.JSONEditorStore.jsonDataChange();
113010
113025
  }
113011
113026
  };
113012
113027
  /** 根据索引路径获取对应的key值路径 */