@wibetter/json-editor 5.1.17 → 5.1.19

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/README.md CHANGED
@@ -11,11 +11,13 @@ React/Mobx/Ant Design
11
11
  ### 特点
12
12
  1. 弹性布局,提供大屏和小屏两种展示模式
13
13
  2. 支持字段联动
14
- 3. 支持12种基础类型组件(input、boolean、 date、date-time、 time、 url、
15
- textarea、number、color、radio、 checkboxes、select)
16
- 4. 支持11个特殊类型组件(object、array、json、datasource、dynamic-data、event、
17
- codearea、htmlarea、text-editor([使用说明](https://github.com/wibetter/json-editor/blob/master/docs/TextEditor.md))、quantity、box-style)
14
+ 3. 支持14种基础类型组件(input、boolean、 date、date-time、 time、 url、
15
+ textarea、number、color、radio、 checkboxes、select、cascader、input-image
16
+ 4. 支持12个特殊类型组件(object、array、json、datasource、dynamic-data、event、
17
+ codearea、htmlarea、text-editor([使用说明](https://github.com/wibetter/json-editor/blob/master/docs/TextEditor.md))、quantity、box-style、padding-margin
18
18
  5. 支持json转schema能力,当schemaData为空而jsonData不为空时,自动通过json转换一个对应的schemaData
19
+ 6. 支持通过表达式设置数据联动(支持两种数据域:全局数据域、当前局部数据域)
20
+ 7. 支持源码模式切换()
19
21
 
20
22
  ***
21
23
 
@@ -52,6 +54,7 @@ class IndexDemo extends React.PureComponent {
52
54
  <div className="json-editor-box">
53
55
  <JSONEditor
54
56
  wideScreen={wideScreen} // 宽屏和小屏的配置项
57
+ jsonView={false} // 开启后展示当前json数据
55
58
  schemaData={jsonSchema}
56
59
  jsonData={jsonData}
57
60
  onChange={(newJsonData) => {
package/lib/index.css CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @wibetter/json-editor v5.1.17
2
+ * @wibetter/json-editor v5.1.18
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Jan 21 2025 18:42:46 GMT+0800 (中国标准时间)
5
+ * build time: Wed Jan 22 2025 16:37:53 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.17
2
+ * @wibetter/json-editor v5.1.18
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Jan 21 2025 18:42:46 GMT+0800 (中国标准时间)
5
+ * build time: Wed Jan 22 2025 16:37:53 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -2863,7 +2863,7 @@ var ObjectSchema = /*#__PURE__*/function (_React$PureComponent) {
2863
2863
  }
2864
2864
  }
2865
2865
  if (currentJsonKey === 'range') {
2866
- if (curJsonData.valueType === 'select' && (!currentSchemaData.options || currentSchemaData.options.length === 0) && (curJsonData.type === 'ContentStaticConfig' || curJsonData.type === 'ResourceCenter')) {
2866
+ if ((!currentSchemaData.options || currentSchemaData.options.length === 0) && (curJsonData.type === 'ContentStaticConfig' || curJsonData.type === 'ResourceCenter')) {
2867
2867
  // 如果 range 没有可选项则从 value 中获取可选项
2868
2868
  var _valueSchema = targetJsonSchema.properties['value'];
2869
2869
  if (['select', 'radio', 'checkboxes'].includes(_valueSchema.type) && _valueSchema.options && _valueSchema.options.length > 0) {
@@ -8211,7 +8211,12 @@ function getWrapOptions(options) {
8211
8211
  var curOptions = [];
8212
8212
  if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_0__.isArray)(options)) {
8213
8213
  options.forEach(function (option) {
8214
- if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_0__.isObject)(option)) {
8214
+ curOptions.push({
8215
+ label: getObjectTitle(option),
8216
+ value: option // isObject(option.value) ? option.value : option,
8217
+ });
8218
+ /*
8219
+ if (isObject(option)) {
8215
8220
  curOptions.push({
8216
8221
  label: getObjectTitle(option),
8217
8222
  value: option // isObject(option.value) ? option.value : option,
@@ -8219,6 +8224,7 @@ function getWrapOptions(options) {
8219
8224
  } else {
8220
8225
  curOptions.push(option);
8221
8226
  }
8227
+ */
8222
8228
  });
8223
8229
  }
8224
8230
  return curOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wibetter/json-editor",
3
- "version": "5.1.17",
3
+ "version": "5.1.19",
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.17
2
+ * @wibetter/json-editor v5.1.18
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Jan 21 2025 18:42:58 GMT+0800 (中国标准时间)
5
+ * build time: Wed Jan 22 2025 16:38:04 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.17
2
+ * @wibetter/json-editor v5.1.18
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Jan 21 2025 18:42:58 GMT+0800 (中国标准时间)
5
+ * build time: Wed Jan 22 2025 16:38:04 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -69271,7 +69271,7 @@ var ObjectSchema = /*#__PURE__*/function (_React$PureComponent) {
69271
69271
  }
69272
69272
  }
69273
69273
  if (currentJsonKey === 'range') {
69274
- if (curJsonData.valueType === 'select' && (!currentSchemaData.options || currentSchemaData.options.length === 0) && (curJsonData.type === 'ContentStaticConfig' || curJsonData.type === 'ResourceCenter')) {
69274
+ if ((!currentSchemaData.options || currentSchemaData.options.length === 0) && (curJsonData.type === 'ContentStaticConfig' || curJsonData.type === 'ResourceCenter')) {
69275
69275
  // 如果 range 没有可选项则从 value 中获取可选项
69276
69276
  var _valueSchema = targetJsonSchema.properties['value'];
69277
69277
  if (['select', 'radio', 'checkboxes'].includes(_valueSchema.type) && _valueSchema.options && _valueSchema.options.length > 0) {
@@ -74507,7 +74507,12 @@ function getWrapOptions(options) {
74507
74507
  var curOptions = [];
74508
74508
  if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_0__.isArray)(options)) {
74509
74509
  options.forEach(function (option) {
74510
- if ((0,_wibetter_json_utils__WEBPACK_IMPORTED_MODULE_0__.isObject)(option)) {
74510
+ curOptions.push({
74511
+ label: getObjectTitle(option),
74512
+ value: option // isObject(option.value) ? option.value : option,
74513
+ });
74514
+ /*
74515
+ if (isObject(option)) {
74511
74516
  curOptions.push({
74512
74517
  label: getObjectTitle(option),
74513
74518
  value: option // isObject(option.value) ? option.value : option,
@@ -74515,6 +74520,7 @@ function getWrapOptions(options) {
74515
74520
  } else {
74516
74521
  curOptions.push(option);
74517
74522
  }
74523
+ */
74518
74524
  });
74519
74525
  }
74520
74526
  return curOptions;