@wibetter/json-schema-editor 5.0.3 → 5.0.7

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,7 +1,7 @@
1
1
  /*!
2
- * @wibetter/json-schema-editor v5.0.2
2
+ * @wibetter/json-schema-editor v5.0.7
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Dec 17 2024 16:03:45 GMT+0800 (中国标准时间)
5
+ * build time: Mon Dec 23 2024 18:08:02 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */.advance-config-model{padding:8px 10px;position:relative;text-align:center}.advance-config-model .mobile-screen-element-warp,.advance-config-model .small-screen-element-warp{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;line-height:38px;margin-bottom:12px;min-width:280px;position:relative}.advance-config-model .mobile-screen-element-warp .element-title,.advance-config-model .small-screen-element-warp .element-title{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-right:12px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all}.advance-config-model .mobile-screen-element-warp .content-item,.advance-config-model .small-screen-element-warp .content-item{position:relative;text-align:left}.advance-config-model .mobile-screen-element-warp .content-item>.mobile-screen-element-warp,.advance-config-model .mobile-screen-element-warp .content-item>.small-screen-element-warp,.advance-config-model .small-screen-element-warp .content-item>.mobile-screen-element-warp,.advance-config-model .small-screen-element-warp .content-item>.small-screen-element-warp{min-width:230px}.advance-config-model .mobile-screen-element-warp .content-item .color-item-form,.advance-config-model .small-screen-element-warp .content-item .color-item-form{width:60px}.advance-config-model .mobile-screen-element-warp .content-item .add-rule-condition-btn,.advance-config-model .small-screen-element-warp .content-item .add-rule-condition-btn{margin:3px 0}.advance-config-model .wide-screen-element-warp{-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-box-align:start;-moz-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;line-height:30px;margin-bottom:6px;min-width:350px;position:relative}.advance-config-model .wide-screen-element-warp .element-title{-webkit-box-flex:0;-moz-box-flex:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-flex:0 1 100px;-ms-flex:0 1 100px;flex:0 1 100px;margin-right:12px;max-width:100px;overflow:hidden;padding-left:12px;text-align:right;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all}.advance-config-model .wide-screen-element-warp .content-item{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 200px;-ms-flex:1 1 200px;flex:1 1 200px;text-align:left}.advance-config-model .wide-screen-element-warp .content-item .color-item-form{width:60px}.advance-config-model .wide-screen-element-warp .content-item .add-rule-condition-btn{margin:3px 0}.advance-config-model .code-area-item{max-width:600px;min-width:230px}.advance-config-model .hidden-rule-box{border-top:1px solid #ccc;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:10px auto 0;padding:8px 15px;width:450px}.advance-config-model .hidden-rule-box .rule-title{-webkit-box-pack:justify;-moz-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;justify-content:space-between;line-height:30px}.advance-config-model .hidden-rule-box .rule-condition-box{-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;background-color:#f8f8f8;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;line-height:30px;min-height:30px;padding:8px 10px;position:relative}.advance-config-model .hidden-rule-box .rule-condition-box .condition-title{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 0 70px;-ms-flex:0 0 70px;flex:0 0 70px;text-align:center}.advance-config-model .hidden-rule-box .rule-condition-box .condition-equal{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 0 40px;-ms-flex:0 0 40px;flex:0 0 40px;text-align:center}.advance-config-model .hidden-rule-box .rule-condition-box .condition-prop,.advance-config-model .hidden-rule-box .rule-condition-box .condition-value{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 100px;-ms-flex:1 1 100px;flex:1 1 100px;text-align:left}.advance-config-model .hidden-rule-box .rule-condition-box .ant-select-single{max-width:145px}.advance-config-model .warning-box{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-moz-box-orient:horizontal;-moz-box-direction:normal;-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-ms-flex-align:center;background-color:#feeceb;color:red;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;font-size:12px;-webkit-justify-content:flex-start;justify-content:flex-start;padding:8px 0;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:cubic-bezier(0,1,.5,1);transition-timing-function:cubic-bezier(0,1,.5,1);width:100%}.advance-config-model .warning-box,.advance-config-model .warning-box .warning-img{-webkit-box-align:center;-moz-box-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.advance-config-model .warning-box .warning-img{-webkit-box-flex:0;-moz-box-flex:0;-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-ms-flex-align:center;-webkit-flex:0 1 60px;-ms-flex:0 1 60px;flex:0 1 60px;-webkit-justify-content:center;justify-content:center}.advance-config-model .warning-box .warning-text{-webkit-box-flex:1;-moz-box-flex:1;-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-flex:1 1 160px;-ms-flex:1 1 160px;flex:1 1 160px;-webkit-justify-content:flex-start;justify-content:flex-start}.advance-config-model .form-item-box,.advance-config-model .warning-box .warning-text{-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.advance-config-model .form-item-box{-webkit-box-pack:stretch;-moz-box-pack:stretch;-ms-flex-pack:stretch;-webkit-justify-content:stretch;justify-content:stretch;min-height:30px}.base-schema-box{-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center;min-height:35px;position:relative}.base-schema-box .warn-text{color:#ad4e00;width:100%}.base-schema-box .key-input-item{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 200px;-ms-flex:1 1 200px;flex:1 1 200px;padding-right:8px}.base-schema-box .type-select-item{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 1 120px;-ms-flex:0 1 120px;flex:0 1 120px;padding-right:8px}.base-schema-box .title-input-item{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 1 200px;-ms-flex:0 1 200px;flex:0 1 200px}.base-schema-box .operate-item{-webkit-box-flex:0;-moz-box-flex:0;-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:0 1 110px;-ms-flex:0 1 110px;flex:0 1 110px;-webkit-justify-content:flex-start;justify-content:flex-start;padding-left:10px}.base-schema-box .operate-item .operate-btn{-webkit-box-flex:0;-moz-box-flex:0;color:#2395f1;cursor:pointer!important;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;margin-right:8px;width:15px}.base-schema-box .operate-item .delete-operate{color:#ff561b}.base-schema-box .operate-item .drag-btn{color:#8a8a8a}.base-schema-box .operate-item .drag-btn:hover{color:#2395f1}.typeSelect-schema-box{-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center;min-height:35px;position:relative}.typeSelect-schema-box .key-input-item{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 200px;-ms-flex:1 1 200px;flex:1 1 200px;padding-right:8px}.typeSelect-schema-box .key-input-item .ant-select{display:block}.typeSelect-schema-box .type-select-item{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 1 120px;-ms-flex:0 1 120px;flex:0 1 120px;padding-right:8px}.typeSelect-schema-box .title-input-item{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 1 200px;-ms-flex:0 1 200px;flex:0 1 200px}.typeSelect-schema-box .operate-item{-webkit-box-flex:0;-moz-box-flex:0;-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:0 1 110px;-ms-flex:0 1 110px;flex:0 1 110px;-webkit-justify-content:flex-start;justify-content:flex-start;padding-left:10px}.typeSelect-schema-box .operate-item .operate-btn{-webkit-box-flex:0;-moz-box-flex:0;color:#2395f1;cursor:pointer!important;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;margin-right:8px;width:15px}.typeSelect-schema-box .operate-item .delete-operate{color:#ff561b}.typeSelect-schema-box .operate-item .drag-btn{background-image:url(//storage.jd.local/cdnnpm/jdw-web/img/drag-default.svg);background-size:contain;color:#8a8a8a;display:inline-block;height:18px;width:18px}.option-schema-box{-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center;min-height:35px;position:relative}.option-schema-box .key-input-item{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 200px;-ms-flex:1 1 200px;flex:1 1 200px;padding-right:8px}.option-schema-box .type-select-item{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 1 120px;-ms-flex:0 1 120px;flex:0 1 120px;padding-right:8px}.option-schema-box .title-input-item{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 1 200px;-ms-flex:0 1 200px;flex:0 1 200px}.option-schema-box .operate-item{-webkit-box-flex:0;-moz-box-flex:0;-webkit-box-pack:start;-moz-box-pack:start;-ms-flex-pack:start;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:0 1 110px;-ms-flex:0 1 110px;flex:0 1 110px;-webkit-justify-content:flex-start;justify-content:flex-start;padding-left:10px}.option-schema-box .operate-item .operate-btn{-webkit-box-flex:0;-moz-box-flex:0;color:#2395f1;cursor:pointer!important;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;margin-right:8px;width:15px}.option-schema-box .operate-item .delete-operate{color:#ff561b}.condition-props-box{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;padding:8px 10px;position:relative}.condition-props-box .title{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 0 70px;-ms-flex:0 0 70px;flex:0 0 70px}.condition-props-box .tags-box{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 100px;-ms-flex:1 1 100px;flex:1 1 100px}.condition-props-box .tags-box .ant-tag{margin-bottom:5px}.json-schema-container{padding:8px 10px;position:relative}.json-schema-container .schema-item-form{-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center;min-height:35px;position:relative}.json-schema-empty{height:50px;line-height:50px;position:relative}.ant-tree-list-holder-inner{-webkit-box-align:stretch;-moz-box-align:stretch;-ms-flex-align:stretch;-webkit-align-items:stretch;align-items:stretch}.ant-tree-switcher{-webkit-box-flex:0;-moz-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.ant-tree-node-content-wrapper{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto}.ant-modal-close-x,.ant-tree .ant-tree-switcher{-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center}
package/lib/index.js CHANGED
@@ -296,8 +296,8 @@
296
296
  N,
297
297
  I,
298
298
  k,
299
- K,
300
299
  w,
300
+ K,
301
301
  P,
302
302
  J,
303
303
  D,
@@ -395,16 +395,16 @@
395
395
  e),
396
396
  Ie = require('@wibetter/json-utils'),
397
397
  ke = Ie.TypeDataList.jsonschema,
398
- Ke = Ie.TypeDataList.input,
399
- we = {
398
+ we = Ie.TypeDataList.input,
399
+ Ke = {
400
400
  jsonSchemaStore:
401
401
  ((O = x.action.bound),
402
402
  (R = x.action.bound),
403
403
  (N = x.action.bound),
404
404
  (I = x.action.bound),
405
405
  (k = x.action.bound),
406
- (K = x.action.bound),
407
406
  (w = x.action.bound),
407
+ (K = x.action.bound),
408
408
  (P = x.action.bound),
409
409
  (J = x.action.bound),
410
410
  (D = x.action.bound),
@@ -530,6 +530,12 @@
530
530
  t +
531
531
  '是JSONSchema的关键字,建议您换一个,避免后续出现数据异常。',
532
532
  ),
533
+ t &&
534
+ t.indexOf('-') > -1 &&
535
+ b.message.warning(
536
+ t +
537
+ '含特殊字符(‘-’),会影响后续数据获取和更新,建议您换一个数值。',
538
+ ),
533
539
  !1)
534
540
  );
535
541
  }),
@@ -544,7 +550,7 @@
544
550
  if ((0, Ie.isContainerSchema)(n)) {
545
551
  var o = this.getNewJsonKeyIndex(n);
546
552
  n.propertyOrder.push(o),
547
- (n.properties[o] = Ke),
553
+ (n.properties[o] = we),
548
554
  this.jsonSchemaChange(t);
549
555
  } else b.message.warning('非对象类型字段不允许插入子元素');
550
556
  }),
@@ -580,7 +586,7 @@
580
586
  var t = (0, Ie.getParentIndexRoute)(e),
581
587
  n = (0, Ie.getSchemaByIndexRoute)(t, this.jsonSchema),
582
588
  o = this.getNewJsonKeyIndex(n);
583
- this.insertJsonData(e, o, Ke);
589
+ this.insertJsonData(e, o, we);
584
590
  }),
585
591
  (t.insertJsonData = function (e, t, n, o, a) {
586
592
  var r = (0, Ie.getParentIndexRoute_CurIndex)(e),
@@ -903,7 +909,7 @@
903
909
  v()(
904
910
  ge.prototype,
905
911
  'indexRoute2keyRoute',
906
- [K],
912
+ [w],
907
913
  Object.getOwnPropertyDescriptor(
908
914
  ge.prototype,
909
915
  'indexRoute2keyRoute',
@@ -913,7 +919,7 @@
913
919
  v()(
914
920
  ge.prototype,
915
921
  'keyRoute2indexRoute',
916
- [w],
922
+ [K],
917
923
  Object.getOwnPropertyDescriptor(
918
924
  ge.prototype,
919
925
  'keyRoute2indexRoute',
@@ -3791,7 +3797,7 @@
3791
3797
  var n;
3792
3798
  return (
3793
3799
  ((n = e.call(this, t) || this).state = {
3794
- jsonSchemaStore: new we.jsonSchemaStore(),
3800
+ jsonSchemaStore: new Ke.jsonSchemaStore(),
3795
3801
  }),
3796
3802
  n
3797
3803
  );
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * @wibetter/json-schema-editor v5.0.2
2
+ * @wibetter/json-schema-editor v5.0.7
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Dec 17 2024 16:03:45 GMT+0800 (中国标准时间)
5
+ * build time: Mon Dec 23 2024 18:08:02 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wibetter/json-schema-editor",
3
- "version": "5.0.3",
3
+ "version": "5.0.7",
4
4
  "description": "JSON数据可视化/JSONSchema,以表单的形式编辑 json schema,可用于在线设计组件的配置面板",
5
5
  "keywords": [
6
6
  "json",