@wibetter/json-editor 5.1.6 → 5.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.css CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.1.6
2
+ * @wibetter/json-editor v5.1.8
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Fri Jan 10 2025 22:53:25 GMT+0800 (中国标准时间)
5
+ * build time: Sun Jan 12 2025 20:46:54 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.1.6
2
+ * @wibetter/json-editor v5.1.8
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Fri Jan 10 2025 22:53:25 GMT+0800 (中国标准时间)
5
+ * build time: Sun Jan 12 2025 20:46:54 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -931,7 +931,7 @@ var ArraySchema = /*#__PURE__*/function (_React$PureComponent) {
931
931
  onClick: this.collapseChange
932
932
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", {
933
933
  className: "title-text"
934
- }, boxTitle), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_6__.RightOutlined, {
934
+ }, boxTitle, "\xA0"), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_6__.RightOutlined, {
935
935
  className: "close-operate-btn"
936
936
  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_6__.DownOutlined, {
937
937
  className: "close-operate-btn"
@@ -2818,7 +2818,7 @@ var ObjectSchema = /*#__PURE__*/function (_React$PureComponent) {
2818
2818
  onClick: this.collapseChange
2819
2819
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", {
2820
2820
  className: "title-text"
2821
- }, boxTitle), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_6__.RightOutlined, {
2821
+ }, boxTitle, "\xA0"), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_6__.RightOutlined, {
2822
2822
  className: "close-operate-btn"
2823
2823
  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_6__.DownOutlined, {
2824
2824
  className: "close-operate-btn"
@@ -4744,7 +4744,7 @@ var ObjectSchema = /*#__PURE__*/function (_React$PureComponent) {
4744
4744
  onClick: this.collapseChange
4745
4745
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", {
4746
4746
  className: "title-text"
4747
- }, boxTitle), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_6__.RightOutlined, {
4747
+ }, boxTitle, "\xA0"), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_6__.RightOutlined, {
4748
4748
  className: "close-operate-btn"
4749
4749
  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_6__.DownOutlined, {
4750
4750
  className: "close-operate-btn"
@@ -5963,6 +5963,10 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
5963
5963
  });
5964
5964
  curJsonData = valueArray;
5965
5965
  }
5966
+ var curValue = curJsonData || targetJsonSchema.default;
5967
+ if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_5__.isObject)(curValue)) {
5968
+ curValue = JSON.stringify(curValue);
5969
+ }
5966
5970
  var style = targetJsonSchema.style ? (0,$utils_index__WEBPACK_IMPORTED_MODULE_9__.buildStyle)((0,mobx__WEBPACK_IMPORTED_MODULE_3__.toJS)(targetJsonSchema.style)) : {};
5967
5971
  var titleStyle = targetJsonSchema.titleStyle ? (0,$utils_index__WEBPACK_IMPORTED_MODULE_9__.buildStyle)((0,mobx__WEBPACK_IMPORTED_MODULE_3__.toJS)(targetJsonSchema.titleStyle)) : {};
5968
5972
  var contentStyle = targetJsonSchema.contentStyle ? (0,$utils_index__WEBPACK_IMPORTED_MODULE_9__.buildStyle)((0,mobx__WEBPACK_IMPORTED_MODULE_3__.toJS)(targetJsonSchema.contentStyle)) : {};
@@ -6001,7 +6005,7 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
6001
6005
  minWidth: '120px'
6002
6006
  },
6003
6007
  onChange: this.handleValueChange,
6004
- defaultValue: curJsonData || targetJsonSchema.default,
6008
+ defaultValue: curValue,
6005
6009
  disabled: readOnly,
6006
6010
  allowClear: (_targetJsonSchema$all = targetJsonSchema.allowClear) != null ? _targetJsonSchema$all : true
6007
6011
  }, options && options.length > 0 && options.map(function (item, optionIndex) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wibetter/json-editor",
3
- "version": "5.1.6",
3
+ "version": "5.1.8",
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.1.6
2
+ * @wibetter/json-editor v5.1.8
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Fri Jan 10 2025 22:53:35 GMT+0800 (中国标准时间)
5
+ * build time: Sun Jan 12 2025 20:46:39 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.1.6
2
+ * @wibetter/json-editor v5.1.8
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Fri Jan 10 2025 22:53:35 GMT+0800 (中国标准时间)
5
+ * build time: Sun Jan 12 2025 20:46:39 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -67382,7 +67382,7 @@ var ArraySchema = /*#__PURE__*/function (_React$PureComponent) {
67382
67382
  onClick: this.collapseChange
67383
67383
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", {
67384
67384
  className: "title-text"
67385
- }, boxTitle), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_17__["default"], {
67385
+ }, boxTitle, "\xA0"), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_17__["default"], {
67386
67386
  className: "close-operate-btn"
67387
67387
  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_18__["default"], {
67388
67388
  className: "close-operate-btn"
@@ -69226,7 +69226,7 @@ var ObjectSchema = /*#__PURE__*/function (_React$PureComponent) {
69226
69226
  onClick: this.collapseChange
69227
69227
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", {
69228
69228
  className: "title-text"
69229
- }, boxTitle), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_12__["default"], {
69229
+ }, boxTitle, "\xA0"), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_12__["default"], {
69230
69230
  className: "close-operate-btn"
69231
69231
  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_13__["default"], {
69232
69232
  className: "close-operate-btn"
@@ -71111,7 +71111,7 @@ var ObjectSchema = /*#__PURE__*/function (_React$PureComponent) {
71111
71111
  onClick: this.collapseChange
71112
71112
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", {
71113
71113
  className: "title-text"
71114
- }, boxTitle), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_13__["default"], {
71114
+ }, boxTitle, "\xA0"), isClosed ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_13__["default"], {
71115
71115
  className: "close-operate-btn"
71116
71116
  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_14__["default"], {
71117
71117
  className: "close-operate-btn"
@@ -72307,6 +72307,10 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
72307
72307
  });
72308
72308
  curJsonData = valueArray;
72309
72309
  }
72310
+ var curValue = curJsonData || targetJsonSchema.default;
72311
+ if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_3__.isObject)(curValue)) {
72312
+ curValue = JSON.stringify(curValue);
72313
+ }
72310
72314
  var style = targetJsonSchema.style ? (0,$utils_index__WEBPACK_IMPORTED_MODULE_6__.buildStyle)((0,mobx__WEBPACK_IMPORTED_MODULE_2__.toJS)(targetJsonSchema.style)) : {};
72311
72315
  var titleStyle = targetJsonSchema.titleStyle ? (0,$utils_index__WEBPACK_IMPORTED_MODULE_6__.buildStyle)((0,mobx__WEBPACK_IMPORTED_MODULE_2__.toJS)(targetJsonSchema.titleStyle)) : {};
72312
72316
  var contentStyle = targetJsonSchema.contentStyle ? (0,$utils_index__WEBPACK_IMPORTED_MODULE_6__.buildStyle)((0,mobx__WEBPACK_IMPORTED_MODULE_2__.toJS)(targetJsonSchema.contentStyle)) : {};
@@ -72345,7 +72349,7 @@ var SelectSchema = /*#__PURE__*/function (_React$PureComponent) {
72345
72349
  minWidth: '120px'
72346
72350
  },
72347
72351
  onChange: this.handleValueChange,
72348
- defaultValue: curJsonData || targetJsonSchema.default,
72352
+ defaultValue: curValue,
72349
72353
  disabled: readOnly,
72350
72354
  allowClear: (_targetJsonSchema$all = targetJsonSchema.allowClear) != null ? _targetJsonSchema$all : true
72351
72355
  }, options && options.length > 0 && options.map(function (item, optionIndex) {